MicroMod Single Pair Ethernet Function Board - ADIN1110 Hookup Guide

Pages
Contributors: QCPete, El Duderino
Favorited Favorite 1

Arduino Examples

The SparkFun ADIN1110 Arduino Library includes several sets of examples to get started communicating between ADIN1110 nodes. In this section we'll take a look at the Arduino example pair for the demo circuit shown in the Hardware Assembly section.

Example Set 3 - Transmit BME280 / Receive LCD Display

Note: This example pair requires two additional libraries; the SparkFun BME280 Library and SparkFun SerLCD Library. Install them through the Arduino Library Manger tool or download them for manual install by clicking the buttons below:

The Example 3 set (3a & 3b) work together to send environmental data from a BME280 connected to the transmitter MicroMod assembly to display on a LCD attached to the receiver MicroMod assembly.

Open an instance of the Arduino IDE for both boards and open the examples by going to File/Examples/SparkFun ADIN1110 Arduino Library/Example 03A_TransmitStrBME280 / 03B_RxStrSerLCD. Take note of the ports for both Processors to keep track of which board is which. Upload the examples to both boards and once a link is confirmed, the boards should start sending/receiving data between each other. If you do not see data or the LINK LEDs lighting up on both Function Boards, open the serial monitor and reset both boards. The code will print out debug data that may help troubleshoot issues with the SPE link.

Example 3A - BME280 Transmit

Example 3A creates the frame parameters for sending data measured by the BME280 and then sends that data over to the receiver every five seconds by default. If the readings from the BME280 change beyond a specified threshold in between reports, the code overrides the five second delay and sends a force report.

Example 3B - LCD Receive

Example 3B readies the ADIN1110 to receive data from the BME280 on the other Function Board and then prints the data to a LCD connected to the MicroMod main board. When starting up, the display will print out "Waiting for connection" and then "Connected" once a link is established. After establishing the link, the display should update with new data every five seconds or more often if the transmit Function Board receives a force update due to large changes in readings from the BME280.