Iboard - Cheap Single board Ethernet Arduino with Radio
-
Hello. I too tried @nneeoo 's edits and am getting check wires.
Here's my relevant RH24_Config settings:
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;And here's my setup in my gateway sketch:
#include <Ethernet.h> #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled #define INCLUSION_MODE_PIN 3 // Digital pin used for inclusion mode button #define RADIO_CE_PIN 5 // radio chip enable #define RADIO_SPI_SS_PIN 6 // radio SPI serial select #define RADIO_ERROR_LED_PIN 10 // Error led pin #define RADIO_RX_LED_PIN 8 // Receive led pin #define RADIO_TX_LED_PIN 9 // the PCB, on board LED #define IP_PORT 5003 // The port you want to open IPAddress myIp (192, 168, 34, 169); -
As an update....I gave up on the software method and just did the hardware modification.
All is well now.
One question: How did you guys do the LED and inclusion buttons? Did you carefully solder right to the Atmega chip or is there a better place to grab the needed pins?
What pins did you use for TX/RX/ERR/Inclusion?
-
Hi @tbully - i personally never bothered with leds/inclusion button.
My gatway is underneath my staircase near vera and my wifi router, so other than when i make a change, i never see it - so leds wouldnt help me.
When i do an inclusion i do so via software..so no button needed either...
I would like a nice 3d printed case for it one day...still havent boxed the iboard up!
-
Hi @tbully - i personally never bothered with leds/inclusion button.
My gatway is underneath my staircase near vera and my wifi router, so other than when i make a change, i never see it - so leds wouldnt help me.
When i do an inclusion i do so via software..so no button needed either...
I would like a nice 3d printed case for it one day...still havent boxed the iboard up!
@gregl said:
Hi @tbully - i personally never bothered with leds/inclusion button.
My gatway is underneath my staircase near vera and my wifi router, so other than when i make a change, i never see it - so leds wouldnt help me.
When i do an inclusion i do so via software..so no button needed either...
I would like a nice 3d printed case for it one day...still havent boxed the iboard up!
Same here, @gregl . I appreciate your write-ups above. They really helped out. I'd like to find a printer and user @jtm312 's design but would like to know how he got the LEDs and Button wired up. Soldering directly to the chip could be difficult without a steady hand.
-
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 -
@hugob - Finally got to try this last night late...Success!
I did also need to add to the EthernetGateway.ino this line to load the Softspi libs...
#include <DigitalIO.h> <-added this too! #include <SPI.h> #include <MySensor.h> #include <MyGateway.h> #include <stdarg.h>I also needed to compile it under a newer IDE version due to memory..I used 1.6.5.
-
@hugob - Finally got to try this last night late...Success!
I did also need to add to the EthernetGateway.ino this line to load the Softspi libs...
#include <DigitalIO.h> <-added this too! #include <SPI.h> #include <MySensor.h> #include <MyGateway.h> #include <stdarg.h>I also needed to compile it under a newer IDE version due to memory..I used 1.6.5.
@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. -
My iboard gw is up and running so far so good!
Using the basic sketch with no LEDs
Question I see only A0 to A5 I/o s where or how can I use t he sketches pins d6 -d9 pins?
I printed the my sensors 3d stl file for the gw and it fits great, but there are the holes for the 3 LEDs and re include button .
Any help would be good maybe just a senior moment eh?
-
I'm using this as a gateway w/ 1.5 also with no issue. I do have the LEDs hooked up as well, using an oversized 'recovered' power supply and the PA+LNA radio with no problems. All I need is a nice case...
-
In the original sketch, you map a variable to a Dn pin. E.g. INCLUSION_MODE_PIN is mapped to pin 3.
The iBoard has no digital ports (Dn) on a connector, but only analog ports (An). Luckily, the analog ports can also be used as digital ports. The modified sketch maps the variables that were mapped to a Dn port in the oririginal sketch, to an An port in the modified sketch. This is the list:Original
INCLUSION_MODE_PIN 3 // Digital pin used for inclusion mode button
RADIO_ERROR_LED_PIN 7 // Error led pin
RADIO_RX_LED_PIN 8 // Receive led pin
RADIO_TX_LED_PIN 9 // the PCB, on board LEDModified
INCLUSION_MODE_PIN 14 // A0 Digital pin used for inclusion mode button
RADIO_ERROR_LED_PIN 15 // A1 Error led pin
RADIO_RX_LED_PIN 16 // A2 Receive led pin
RADIO_TX_LED_PIN 17 // A3 the PCB, on board LEDSo for the iBoard, the receive LED has to be connected to pin 16 (A2). Etc.
If you carefully look at the code, you will notice that also RADIO_SPI_SS_PIN changed from 6 to 8. That is because the header for the radio chip on the iBoard is connected to a different Arduino pin on the iBoard, than it is on the wiring diagram of the original gateway diagram. But this is just an internal issue. It should not bother you if you build the gateway.
-
Hi Guys!
I have got a Wborad Ex board with built in wifi (rak410) from itead.
http://wiki.iteadstudio.com/Wboard_ExUnfortunately I can not find anywhere arduino code that would work of the board with wifi.
Does anyone have the same board and could possibly help?Itead said it works on this demo, but without success .
http://blog.iteadstudio.com/basic-testtutorial-for-itead-wifi-shield-rev2-by-david-morphett/Thanks:
Gabor -
Hi Guys!
I have got a Wborad Ex board with built in wifi (rak410) from itead.
http://wiki.iteadstudio.com/Wboard_ExUnfortunately I can not find anywhere arduino code that would work of the board with wifi.
Does anyone have the same board and could possibly help?Itead said it works on this demo, but without success .
http://blog.iteadstudio.com/basic-testtutorial-for-itead-wifi-shield-rev2-by-david-morphett/Thanks:
Gabor -
I know this is a basic question but what do I need to buy to program this using USB from my PC? So far I've just tinkered with Nanos which have a usb port on it.... An ebay link would be great!
-
I know this is a basic question but what do I need to buy to program this using USB from my PC? So far I've just tinkered with Nanos which have a usb port on it.... An ebay link would be great!
@TommySharp something like this or simlar http://www.itead.cc/foca.html
-
I know this is a basic question but what do I need to buy to program this using USB from my PC? So far I've just tinkered with Nanos which have a usb port on it.... An ebay link would be great!
@TommySharp
I just changed over to the iBoard Ethernet gateway from serial. I used the FTDI breakout board to program it. Very simple to use. The FTDI board is also needed for programming pro minis.