sparkfun AST-CAN485 Hook-Up Manual Download Page 14

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

Summary of Contents for AST-CAN485

Page 1: ...ven better WiFi In order to further the communications capabilities of the CAN485 we present the AST CAN485 Wifi Shield The shield is based on the Sparkfun ESP8266 thing and allows for a CAN485 module...

Page 2: ...DI Basic Breakout 5V DEV 09716 This is the newest revision of our FTDI Basic https www sparkfun com products retired 9115 We n SparkFun USB Mini B Cable 6 Foot CAB 11301 This is a USB 2 0 type A to Mi...

Page 3: ...started with the board Depending on your setup you may need to install custom libraries and board add ons Soldering Iron 60W Adjustable Temperature TOL 14456 Solder Lead Free 15 gram Tube TOL 09163 P...

Page 4: ...ompact form factor of the ProMini In addition to all the usual features it has on board CAN and RS485 ports enabling quick and easy interfacing to a multitude of industrial devices Working with Wire H...

Page 5: ...ls presoldered to the board for fast and secure connections The input voltage range is 7 24VDC The input voltage is regulated down to 5V to supply power the CAN485 board as well as 3 3V to power the E...

Page 6: ...ESP8266 Based on the SparkFun ESP8266 Thing you can use either the PCB trace antenna or the U FL connector if housed in a metal enclosure Page 6 of 16...

Page 7: ...ate the RX and TX signals When programing either the ESP8266 or CAN485 board move the switch over to the PROG position and after the upload is complete toggle the switch to the RUN position Speaking o...

Page 8: ...AST CAN485 Serial Port A header breaks out the Software Serial port used by the CAN485 This can be used as a debugging serial port or to connect other devices Page 8 of 16...

Page 9: ...Pinouts The pinout for the WiFi Shield is shown below Image courtesy of AST Page 9 of 16...

Page 10: ...munications between the two devices The trade off of this feature is that it uses the main serial port which is also used to program the CAN485 and is broken out on its FTDI header This means that in...

Page 11: ...3V circuits Software Setup and Programming Note This example assumes you are using the latest version of the Arduino IDE on your desktop If this is your first time using Arduino please review our tut...

Page 12: ...e ESP8266 Arduino Addon which has been developed by the ESP community The Addon can be downloaded via the GitHub Repository or by clicking the button below ESP8266 GITHUB REPOSITORY ZIP This implement...

Page 13: ...mode selection switch to RUN to reconnect the devices ESP8266 Thing Development Board Hookup Guide NOVEMBER 5 2015 An overview of SparkFun s ESP8266 Thing Development Board a development board for th...

Page 14: ...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 ov...

Page 15: ...r next project Check out some of these related tutorials Or dig in further with According to Pete for more information about RS485 OBD II UART Hookup Guide How to start working with the OBD II Uart bo...

Page 16: ...According to Pete How RS 485 Works APRIL 2 2018 Page 16 of 16 3 1 2019 https learn sparkfun com tutorials ast can485 wifi shield hookup guide _ga 2 175783717...

Reviews: