As the device encourages hacking (as do all Arduino products, thank you Open Source), I have worked to document the pinouts of the expansion headers. This is my work and not an official release. It is based on the officially released schematic, information on the 32U4 chip and electrical and software testing on my part.
My interest stems from expanding the capabilities of the Esplora. Yes it has many sensors and displays, but I may wish to add a sensor. But more importantly to connect it to the Internet of Things (or to act as a good controller), it should have wireless communication. So I have connected the Esplora via hard serial and soft serial with good results.
Note: the Esplora has dedicated the pins for another use - we are repurposing the display pins fo this will not work well with both something else and a display connected (you might be able to do something but it is beyond this post).
The hardware serial, Digital Pins 0 and 1 which are Serial Receive and Transmit on classic Arduino Uno etc. map to the Esplora right expansion header pins 7 and 8. On the Uno they are shared with the USB port but on designs based on the Leonardo like the Esplora, the hardware serial is connected separately. The hardware serial is addressed as Serial1 for Leonardo style Arduionos (the regular Serial port being the USB).
Software-wise, this means the Serial() function talks to the USB. The Serial1() function talks to the hardware serial pins. The SoftwareSerial library works on Leonardo based designs but the receive pin only works on classic I/O pins 8, 9, 10, 11, 14 (MISO), 15 (SCK), and 16 (MOSI) according to a comment in the SoftwareSerial example. I confirmed the hardware receive pin will not work as the software serial receive (transmit works though). Here is a wiring diagram for the SoftwareSerial. Note the ground and 5 volt pins are connected also.
I use a TTL serial to USB device called a Foca from IteadStudios but a FTDI Friend or similar is fine. It should be 5 volt compliant (as the Esplora is a 5 volt Arduino). Biggest note: the Esplora Transmit (expansion pin 8) should connect to the receive of the device and the Esplora Receive (hardware is expansion pin 7 for hardware, one of the others like expansion pin 6 for softwareserial).
The software examples for hardware and software serial connection are posted at https://github.com/TheKitty/EsploraSerial
Next up is connecting the serial lines to an Xbee radio.
No comments:
Post a Comment