AB&T
/
EasyCAT_LAB_very_simple
EasyCAT LAB - EtherCAT master very simple example
- This repository contains a very basic example for the EasyCAT LAB , a complete educational and experimental EtherCAT® system, composed of one master and two slaves.
- The EasyCAT LAB is provided as a kit by AB&T Tecnologie Informatiche, to allow everybody to have an educational EtherCAT® system up and running in a matter of minutes.
- It uses the SOEM (Simple Open EtherCAT® Master) library by rt-labs, that has been ported in the ecosystem by AB&T Tecnologie Informatiche.
- The slaves are based on the EasyCAT SHIELD and the Arduino UNO.
Note
- This example uses two LAB 2 slaves.
Note
- In this example, to keep things as simple as possible, only two bytes of data are exchanged between the slaves and the TFT display is not used .
Diff: main.cpp
- Revision:
- 1:971b4897a4c5
- Parent:
- 0:bc829777f1ea
- Child:
- 2:368e7d4d8171
--- a/main.cpp Tue Jul 09 16:25:27 2019 +0000 +++ b/main.cpp Fri May 07 10:19:40 2021 +0000 @@ -44,7 +44,7 @@ #define SysMilliS() (uint32_t)Kernel::get_ms_count() -Serial pc(USBTX,USBRX,115200); // set the debug serial line speed to 115200 +UnbufferedSerial pc(USBTX,USBRX,115200); // set the debug serial line speed to 115200 @@ -285,7 +285,7 @@ while(1) { LED_RED = !LED_RED; - wait_ms(100); + ThisThread::sleep_for(100ms); } }