Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. hugob
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by hugob

    • RE: Iboard - Cheap Single board Ethernet Arduino with Radio

      I am using the Itead iBoard as a gateway to a Vera Light for a few days now. Without any hardware modifications, only a few changes in header files required. I think the main issue is that you should map the inclusion button and led's to the Ax pins and use the full constructor (with 7 parameters). Beware of the last line in the first snippet. If you use the shortcut constructor (with three parameters), it will use defaults for the other parameters and your defs will be ignored.
      To verify my assumptions above, I included a led to the A2 pin and it is blinking as expected on arrival of a packet.
      The code below may look intimidating. But I posted the whole thing for easy reference. You can do the software changes in one minute.

      Hugo

      Snippet from EthernetGateway.ino:

      #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled
      #define INCLUSION_MODE_PIN  14 //A0 // Digital pin used for inclusion mode button
      
      #define RADIO_CE_PIN        3 // radio chip enable
      #define RADIO_SPI_SS_PIN    8  // radio SPI serial select
      #define RADIO_ERROR_LED_PIN 15 //A1 // Error led pin
      #define RADIO_RX_LED_PIN    16 //A2 // Receive led pin
      #define RADIO_TX_LED_PIN    17 //A3 // the PCB, on board LED
      
      #define IP_PORT 5003        // The port you want to open 
      IPAddress myIp (192, 168, 178, 66);  // Configure your static ip-address here    COMPILE ERROR HERE? Use Arduino IDE 1.5.7 or later!
      
      // The MAC address can be anything you want but should be unique on your network.
      // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
      // Note that most of the Ardunio examples use  "DEAD BEEF FEED" for the MAC address.
      byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };  // DEAD BEEF FEED
      
      // a R/W server on the port
      EthernetServer server = EthernetServer(IP_PORT);
      
      // No blink or button functionality. Use the vanilla constructor.
      //MyGateway gw(RADIO_CE_PIN, RADIO_SPI_SS_PIN, INCLUSION_MODE_TIME);
      
      // Uncomment this constructor if you have leds and include button attached to your gateway 
      MyGateway gw(RADIO_CE_PIN, RADIO_SPI_SS_PIN, INCLUSION_MODE_TIME, INCLUSION_MODE_PIN, RADIO_RX_LED_PIN, RADIO_TX_LED_PIN, RADIO_ERROR_LED_PIN);
      

      Snippet from \Arduino\libraries\MySensors\utility\RF24_config.h

      #define MINIMAL
        //#define SPI_UART  // Requires library from https://github.com/TMRh20/Sketches/tree/master/SPI_UART
        #define SOFTSPI   // Requires library from https://github.com/greiman/DigitalIO
        /**********************/
        
        // Define _BV for non-Arduino platforms and for Arduino DUE
      #if defined (ARDUINO) && !defined (__arm__)
      	#if defined(__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) || defined(__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__)
      		#define RF24_TINY
      		#define _SPI SPI
      	#else
      	  #if defined SPI_UART
      		#include <SPI_UART.h>
      		#define _SPI uspi
      	  #elif defined SOFTSPI
      	  // change these pins to your liking
      	  //
      	  const uint8_t SOFT_SPI_MISO_PIN = 6; 
      	  const uint8_t SOFT_SPI_MOSI_PIN = 5; 
      	  const uint8_t SOFT_SPI_SCK_PIN = 7;  
      	  const uint8_t SPI_MODE = 0;
      	  #define _SPI spi
      		  #else	    
      		#include <SPI.h>
      		#define _SPI SPI
      	  #endif
      	#endif
      #else
      posted in Hardware
      hugob
      hugob
    • RE: Iboard - Cheap Single board Ethernet Arduino with Radio

      @gregl
      Good to hear that you can confirm that this is working. My unmodified IBoard gateway is working for months now without problems. But as I said in some other topic, this board needs a decent power supply.
      So all you need for a MySensors Ethernet gateway is this board, a NRF24L01 Radio that plugs in into this board, and a power supply. No mess with cables like in http://www.mysensors.org/build/ethernet_gateway. This board has 7 IO ports in case you want the leds. For $17.50 this is a no brainer.

      posted in Hardware
      hugob
      hugob