![sparkfun AST-CAN485 Hook-Up Manual Download Page 14](http://html1.mh-extra.com/html/sparkfun/ast-can485/ast-can485_hook-up-manual_1339617014.webp)
Programming the ESP Module
Image courtesy of AST
Programming the CAN485
The following process is followed in order to program the CAN485 module:
• Switch the mode selection switch to PROG.
• Connect a
5V
FTDI to the FTDI header on the CAN485 module.
• Upload a sketch
• Return the mode selection switch to RUN to reconnect the devices.
Programming Inserted CAN485 Module
Image courtesy of AST
Examples
The WiFi Shield GitHub Repository includes a few examples which demonstrate the use of the board.
After downloading the repository, open up one the examples in the Arduino IDE. Select the
CAN485
as
the board, the COM port that it enumerated on, and hit upload to test.
Basic Serial Example
This example demonstrates serial communication between and inserted CAN485 and the on board
ESP8266. Each device has a built in LED which is controlled by the other device over the serial port.
Operation is as follows:
• The CAN485 sends a command to the ESP every 100 ms.
• The ESP sets its LED on or off depending on the command.
• The ESP sends the same command back to the CAN485.
• The CAN485 sets its LED depending on the command received by the ESP.
In addition to the examples in the WiFi Shield GitHub Repository, there are a number of examples
using the ESP8266 in the ESP Arduino Library. These are accessible in the Arduino IDE under
File
>
Examples
. Examples may also be found in the ESP Github Community Forum.
Resources and Going Further
For more information, check out the resources below:
AST-CAN485 WiFi Shield
Page 14 of 16