P5_Automation_can-dev-res-working-1930.ino 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. /* P5_Automation_can-dev
  2. * 2020-06 testing communications CAN for integrate further with Procesy5
  3. * A.Binder
  4. * Uses:
  5. * LCD1602 - big 2x16 character display
  6. * TFT_ILI9163C 128x128 lcd display
  7. * MCP_2515 - can port controller
  8. * //#define HAS_I2C_driver_Adafruit_PWMServoDriver
  9. * controls
  10. * Slave ports via:
  11. * I2C
  12. * PCA9685 - 16port 12bit PWM driver - can controll 16 eg. LEDs which can be 0....12V dimmed=]
  13. * todo 74HC595 - Serial to Parallel Shifting-Out - from 8 ports to many if connected in paraller
  14. * based on https://www.arduino.cc/en/tutorial/ShiftOut
  15. * or 16 servos
  16. * - can have addressed many of PCA9685 on I2C bus - so can controll over 64 ports
  17. * to be added another devices tested
  18. * todo Rottary Swich { GND, +, SW, DT, CLK } - to provide LCD menu access
  19. * TODO structure of port is in _Slave_Ports.h
  20. * _Slave_Port _Slave_Ports[] = {
  21. {"CAN", 0x102, 0x80, 0x00, 0, 0x00, 0x00 },
  22. {"CAN", - Base port origin protocol
  23. 0x102, - Base port origin protocol address
  24. 0x80, - int PortTypes; 0xFF = 1111 1111
  25. 0x01 = 0000 0001 = PWM port
  26. {
  27. bit 1 - PWM port
  28. bit 2 - not allocated
  29. bit 3 - not allocated
  30. bit 4 - not allocated
  31. bit 2 - not allocated
  32. bit 5 - not allocated
  33. bit 6 - not allocated
  34. bit 7 - not allocated
  35. bit 8 - not allocated
  36. },
  37. 0x00, int Address - local address on e.g. I2C bus - 0x40 etc
  38. 0x00, - int LocalPort - local port number when used e.g. I2C extension
  39. 0x01 - Exp_state - 0xFF = 1111 1111
  40. 0x00 = 0000 0000 = OFF = 0V
  41. 0x01 = 0000 0001 = ON = PWM max
  42. {
  43. bit 1 - OFF = 0V
  44. bit 2 - ON = PWM max
  45. bit 3 - not allocated
  46. bit 4 - not allocated
  47. bit 2 - not allocated
  48. bit 5 - not allocated
  49. bit 6 - not allocated
  50. bit 7 - not allocated
  51. bit 8 - not allocated
  52. },
  53. 0x6d - testowy ttl - 10 sekund do przedawnienia stanu portu w tablicy i koniecznosci odswiezenia tablicy
  54. }
  55. };
  56. - to be optimalized for inegration
  57. - to allow of subscribe ports
  58. - to allow of concurent routing
  59. - to allow new port detectioj
  60. - to allow creating ports dependencies e.g. IF
  61. - port has value
  62. - port AND port
  63. THEN
  64. - set port
  65. - probably should be avilable creations of virtual ports which would describe
  66. - state of port AND port etc...
  67. * TO BE INTEGRATED WITH p5
  68. * - interface and WFST
  69. * TO BE INGEGRATED WITH MARLIN 3D PRINTERS - machine and automation purpose
  70. * - controll remote ports via g-code
  71. * - allows interrupts
  72. * TO ALLOW OF NEXT PACKETS TYPES WITH DIFFERENT MEANINGS
  73. * - dimming
  74. * logic
  75. */
  76. //#define HAS_DEBUG_ACTION_TRIG
  77. //#define DEBUG_I2C //to debug _Slave_Ports_I2C_POP etc
  78. //#define HAS_TFT_ILI9163C
  79. //#define HAS_TFT_ILI9163C__ROTATED
  80. //#define HAS_LCD1602
  81. //#define HAS_LCD1602_I2C
  82. //#define LCD1602_DISPLAY_PHYSICAL_X_CHARS_A
  83. //#define LCD1602_DISPLAY_PHYSICAL_Y_CHARS_A
  84. //#define HAS_ROTTARY_SW
  85. #define ROTTARY_ENCODER_ACTION_MILLIS_MIN 250
  86. //#define HAS_CAN
  87. //#define DEBUG_I2C_driver_Adafruit_PWMServoDriver
  88. //#define DEBUG_CAN
  89. //#define DEBUG_QUEUE
  90. //#define DEBUG_QUEUE_ASSERT
  91. //#define DEBUG_QUEUE_WAIT 500
  92. //#define DEBUG_STRUCT_INIT
  93. //#define DEBUG_STORAGE_QUEUE_TEST
  94. //#define DEBUG_ARDUINO_ATTR_ARRAY_S__commit_added_element_QUEUE
  95. //#define DEBUG_ARDUINO_ARRAY_INDEX_NEXT_LOCK
  96. //#define HAS__PCINT_setup //to allow interrupts
  97. //#define DEBUG_TASK_TYPE_T_Slave_Ports_broadcast____
  98. //#define DEBUG_TASK_TYPE_T_DISPLAY_queue_pop________
  99. //#define DEBUG_TASK_TYPE_T_Slave_Ports_set_I2C______
  100. //#define DEBUG_QUEUE_ASSERT todo not working
  101. //#define DEBUG_LAST_ACTION_TRIG_ENABLE
  102. #define DISABLE_DISPLAY__add_record
  103. #define DISPLAY_array16_T_is_DISPLAY_string_T
  104. #define ENABLE_DISPLAY_MENU
  105. #define USE_DISPLAY_string_T
  106. //#define USE_DISPLAY_char_PA //dev testing pointer to display
  107. //#define DISABLE_ANY_PRINT //when uno ?
  108. //#define DEBUG 3
  109. //#define DISABLE_LOOP
  110. #define DISABLE_QUEUE_REASSIGN
  111. //#define DEBUG_LATENCY_MARKER
  112. //ports assign config
  113. #define PortA1 A1 //for rottary pro mini SW
  114. #define PortA2 A2 //for rottary pro mini SW DT
  115. #define PortA3 A3 //for rottary pro mini SW CLK
  116. #define PortA7 A7 //
  117. #define PortA8 A8 //for rottary sw
  118. #define PortA9 A9 //for rottary sw dt
  119. #define PortA10 A10 //for rottary sw clk
  120. #define Port7 7 //for TFT_ILI9163C_CSpin 7
  121. #define Port8 8 //for TFT_ILI9163C_DCpin 8
  122. #define Port9 9 //for TFT_ILI9163C__RSTpin 9
  123. #define Port10 10 // CAN_INTpin 10
  124. #define Port11 11 // todo PIR LOCAL
  125. #define Port12 12 // todo change CAN to 12 from 53
  126. #define Port53 53 // #define CAN_CSpin 53 //todo change can be 12?
  127. #define Sprintln(a) (Serial.println(a))
  128. /*
  129. Then instead of
  130. Serial.println(F("Hello world!"));
  131. write
  132. Sprintln(F("Hello world!"));
  133. etc. To deactivate the Serial printing, define the macro empty:
  134. #define Sprintln(a)
  135. */
  136. const int DISPLAY_MENU_A__PROGMEM_CONSOLE_PRINT = 3 ;
  137. #include "progmem.h"
  138. #include "___CONFIG/config_Active_Controller_EEPROM.h" //there kleep id of device
  139. #include "___CONFIG/config_Active_ControllerID.h" //there kleep id of device
  140. //config active should once update id
  141. //EEPROM_Active_ControllerID_read_T EEPROM_Active_ControllerID_read_A = EEPROM_Active_ControllerID_read();
  142. #define HAS__jm_Scheduler //to allow planned actions blink etc
  143. #if defined(HAS__jm_Scheduler)
  144. #include "jm_Scheduler.h"
  145. #endif
  146. //Debug level
  147. //#define DEBUG 5
  148. //#define DISABLE_LOOP //To debug and disable any output
  149. #include "__main_struct.h" //lite #include "___main/__main_struct.h"
  150. //#include "automation_driven.submodule.struct.write.h"
  151. #include "__main_trigger_struct.h" //lite #include "___main/__main_trigger_struct.h"
  152. #include "__main_struct_funct.h" //lite #include "___main/__main_struct_funct.h"
  153. #include "__main_struct_limits.h" //lite ___main/
  154. #include "_time_struct.h"
  155. #include "_DRIVER_STATUS_struct.h" //lite
  156. #include "__main_I2C_struc.h" //lite ___main/
  157. #include "__main_static.h" //lite ___main/
  158. #include "__main_auto.h" //lite ___main/
  159. #include "__main_register.h" //lite ___main/
  160. #include "__main_extern.h" //lite ___main/
  161. #include "___template/__STORAGE_ARRAY_func.h" //testing
  162. //#define _ControllerID 0x11
  163. //#define _Slave1_ID 0x13
  164. //#include "Active_ControllerID_0x103.h"
  165. //#define Active_ControllerID _ControllerID
  166. //#define Active_ControllerID _Slave1_ID
  167. //#include "config_Slave_Ports_LOCAL_0x101_init.h" //there kleep config of this id device
  168. #define print_SEP_RT "]"
  169. #include "config_Slave_Ports_LOCAL_config.h" //lite
  170. #if defined(HAS_TFT_ILI9163C)
  171. #include "_TFT_ILI9163C_config.h"
  172. #endif
  173. #include "_DISPLAY_struct.h" //lite
  174. #include "_Port_ID_sruct.h"
  175. #include "_TASK_TYPES_struct.h"
  176. #include "_Slave_Ports_Status_QUEUE_struct.h"
  177. //#include "Slave_Ports_Status_QUEUE.h"
  178. #include "_I2C_driver_Adafruit_PWMServoDriver_struct.h" //lite
  179. #include "_CAN_config.h" //lite _CAN/
  180. #if defined(HAS_ROTTARY_SW)
  181. #include "_ROTTARY_SW_config.h" //_ROTTARY_SW/
  182. #endif
  183. #if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
  184. #include "_I2C_driver_Adafruit_PWMServoDriver_config.h" //lite _I2C_driver_Adafruit_PWMServoDriver/
  185. #endif
  186. #if defined(HAS_ROTTARY_SW)
  187. #include "_ROTTARY_SW_struct.h" //lite _ROTTARY_SW/
  188. #endif
  189. #include "Queue.h"
  190. //#include "TPQ.h"
  191. Queue<int> _Slave_Ports_queue = Queue<int>(ARDUINO_ARRAY_INDEX_LIMIT_QUEUE);
  192. Queue<int> TEST_QUEUE = Queue<int>(ARDUINO_ARRAY_INDEX_LIMIT_QUEUE);
  193. /*#if Active_ControllerID == _ControllerID
  194. String lcdPattern = "s" ;
  195. #endif
  196. #if Active_ControllerID == _Slave1_ID
  197. String lcdPattern = "." ;
  198. #endif
  199. */
  200. //BEGIN 1602
  201. #if defined(HAS_LCD1602) or defined(HAS_LCD1602_I2C)
  202. // initialize the library with the numbers of the interface pins
  203. //LiquidCrystal lcd(4, 6, 10, 11, 12, 13);
  204. //LiquidCrystal lcd(4, 6, 53, 51, 50, 52 );
  205. #include "_LCD1602_struct.h"
  206. #endif
  207. #if defined(HAS_TFT_ILI9163C)
  208. #include "_TFT_ILI9163C_struct.h"
  209. #endif
  210. #if defined(HAS__PCINT_setup)
  211. #include "_PCINT_struct.h" //pins MYPIN1 MYPIN2 MYPIN3
  212. #endif
  213. //BEGIN CAN
  214. #include "_CAN_init.h" //lite #include "_CAN/_CAN_init.h"
  215. //EOF CAN
  216. //REMOTE PORTS DEFINITIONS
  217. #include "_PortTypes_struct.h"
  218. #include "_PortStates_struct.h"
  219. #include "_Port_Exp_state_ttl_struct.h"
  220. #include "_Port_Broadcast_state_struct.h"
  221. #include "_Port_I2C_driver_struct.h"
  222. #include "_Slave_Ports_Status_struct.h"
  223. #include "_Slave_Ports_Protocol_CAN_struct.h" //lite _CAN/
  224. #include "_Slave_Ports_Protocol_CAN_func.h"
  225. #include "automation_driven.submodule.struct.write.h"
  226. #if defined(HAS_TFT_ILI9163C)
  227. #include "_TFT_ILI9163C_func.h"
  228. #endif
  229. #include "_DISPLAY_DEV.h"
  230. #if defined(HAS_SERIAL_PROXY)
  231. #include "SERIAL_PROXY__struct.h"
  232. #endif
  233. #if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
  234. #include "_I2C_driver_Adafruit_PWMServoDriver_func.h" //lite _I2C_driver_Adafruit_PWMServoDriver/
  235. #endif
  236. #include "_TASK_TYPES_func.h"
  237. #include "_Slave_Ports_Status_QUEUE_add_func.h"
  238. #include "_DISPLAY_add_record_func.h"
  239. #include "_DISPLAY_func.h"
  240. #if defined(HAS_LCD1602) or defined(HAS_LCD1602_I2C)
  241. #include "_LCD1602_init.h"
  242. #endif
  243. #if defined(HAS_LCD1602) or defined(HAS_LCD1602_I2C)
  244. #include "_LCD1602_func.h"
  245. //#include "_LCD1602_init.h"
  246. #endif
  247. #if defined(HAS_ROTTARY_SW)
  248. #include "_ROTTARY_SW_func.h" //lite _ROTTARY_SW/
  249. #endif
  250. #include "_time_func.h"
  251. #include "_Slave_Ports_ttl_decrement_func.h"
  252. #include "_Slave_Ports_broadcast_func.h"
  253. #include "TASK_TYPE_T_Set_Port_Smooth_forward__.h"
  254. #include "_Slave_Ports_I2C_func.h"
  255. #include "_Slave_Ports_action_func.h"
  256. #include "_DISPLAY_queue_pop_func.h"
  257. #include "_Slave_Ports_Status_QUEUE_func.h"
  258. #include "TASK_TYPE_T_Get_Ports_Status_INPUT_A___.h"
  259. #include "_Slave_Ports_Status_func.h"
  260. #include "Slave_Ports_Status__DISPLAY_TARGET.h"
  261. #include "TASK_TYPE_T_Set_Ports_Status_LIMITS_A__.h"
  262. #include "TASK_TYPE_T_Set_Ports_Status_ASSOC.h"
  263. #include "_CAN_func.h" //lite _CAN/
  264. //EOF SERIAL ##############//EOF SERIAL ##############//EOF SERIAL ##############
  265. #include "SERIAL__init.h"
  266. #if defined(HAS_SERIAL_PROXY_SoftwareSerial)
  267. #include <SoftwareSerial.h>
  268. //SoftwareSerial SERIAL_PROXY_DEVICE(SERIAL_PROXY_SoftwareSerial_rx_pin, SERIAL_PROXY_SoftwareSerial_tx_pin); // RX, TX
  269. #include "SERIAL_PROXY__init.h"
  270. #if defined(SERIAL_PROXY_DEVICE)
  271. #errior when set HAS_SERIAL_PROXY_SoftwareSerial - cannot be set both hardware SERIAL_PROXY_DEVICE
  272. #endif
  273. #endif
  274. #if defined(HAS_SERIAL_PROXY)
  275. #include "SERIAL__struct.h"
  276. // #include "SERIAL__func.h"
  277. #endif
  278. #if defined(HAS_SERIAL_PROXY_DISPLAY_SLAVE)
  279. #define SoftwareSerial_SLAVE SoftwareSerial
  280. #include "SERIAL_PROXY_DISPLAY_SLAVE__init.h"
  281. #include "SERIAL_PROXY_DISPLAY_SLAVE__func.h"
  282. #endif
  283. #if defined(HAS_SERIAL_PROXY_DISPLAY_MASTER)
  284. #define SoftwareSerial_MASTER SoftwareSerial
  285. #include "SERIAL_PROXY_DISPLAY_MASTER__init.h"
  286. #include "SERIAL_PROXY_DISPLAY_MASTER__func.h"
  287. #endif
  288. #if defined(HAS_SERIAL_PROXY)
  289. // #define SoftwareSerial_PROXY SoftwareSerial
  290. // #include "SERIAL__struct.h"
  291. #include "SERIAL_PROXY__func.h"
  292. #include "SERIAL__func.h"
  293. #endif
  294. //EOF SERIAL ##############//EOF SERIAL ##############//EOF SERIAL ##############
  295. // #include "_Slave_Ports_ttl_decrement_POP.h"
  296. // #define _CAN_P_0x102_PWM0x00_0 { _Slave1_ID , "PWM", 0x00, 0 }
  297. //#define _CAN_P_0x102_PWMServoDriver0x40
  298. // #define Adafruit_PWMServoDriver pwm1 = Adafruit_PWMServoDriver();
  299. // Adafruit_PWMServoDriver pwm1 = Adafruit_PWMServoDriver(0x40);
  300. // #define __CSpin 53 // 10 // chip select
  301. #if defined(HAS_TFT_ILI9163C)
  302. #include "_TFT_ILI9163C_init.h"
  303. #endif
  304. #include "_DISPLAY_init.h"
  305. #if defined(HAS_SERIAL_PROXY)
  306. #include "automation_driven.submodule.struct.read__communication_generated.h"
  307. #endif
  308. #if defined(HAS__PCINT_setup)
  309. #include "_PCINT_init.h"
  310. #endif
  311. #include "config_Slave_Ports_LOCAL_init.h"
  312. #if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
  313. #include "_I2C_driver_Adafruit_PWMServoDriver_init.h" //lite _I2C_driver_Adafruit_PWMServoDriver/
  314. #endif
  315. #include "__main_init.h" //lite ___main/
  316. #ifdef DISABLE_LOOP
  317. #include "___DEBUG/___DEBUG_DISABLE_INIT.h"
  318. #endif
  319. #include "scan.h"
  320. //test driven lcd_display
  321. #include "automation_driven_main.submodule.struct.write.lcd_menu.h"
  322. void setup() { //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
  323. Serial.begin(115200);
  324. Wire.begin();
  325. scan_h();
  326. ARDUINO_SETUP_DEF_T HAS_I2C_driver_Adafruit_PWMServoDriver_A = false;
  327. #if defined(DEBUG) || defined(DEBUG_QUEUE)
  328. Serial.println("#329 Serial.begin(115200)");
  329. #endif
  330. ARDUINO_SETUP_DEF_T HAS_ROTTARY_SW_A = false;
  331. //#include "___CONFIG/0x11/setup_Active_ControllerID_0x11.h"
  332. //#include "___CONFIG/0x13/setup_Active_ControllerID_0x13.h"
  333. //todo PCINT service
  334. #if defined(DISABLE_LOOP) || defined(DEBUG)
  335. Serial.println("#375 will include ___main/__main_I2C_setup.h");
  336. #endif
  337. #include "__main_I2C_setup.h" //lite ___main/
  338. #if defined(HAS__PCINT_setup)
  339. #include "_PCINT_setup.h" //empty
  340. #endif
  341. #if defined(HAS_ROTTARY_SW)
  342. #include "_ROTTARY_SW_setup.h" //Attach interrupts //lite _ROTTARY_SW/
  343. #endif
  344. #if defined(HAS_SERIAL_PROXY_SoftwareSerial)
  345. SERIAL_PROXY_DEVICE.println("<text,99,12.34,77>");
  346. pinMode(SERIAL_PROXY_SoftwareSerial_rx_pin, INPUT);
  347. pinMode(SERIAL_PROXY_SoftwareSerial_rx_pin, OUTPUT);
  348. SERIAL_PROXY_DEVICE.begin(SERIAL_PROXY_SPEED);
  349. #endif
  350. #if defined(HAS_SERIAL_PROXY)
  351. #include "SERIAL_PROXY__setup.h"
  352. #endif
  353. #if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
  354. #if defined(DISABLE_LOOP) || defined(DEBUG) || defined(DEBUG_I2C_driver_Adafruit_PWMServoDriver)
  355. Serial.println("#401 will include /_I2C_driver_Adafruit_PWMServoDriver_setup.h");
  356. #endif
  357. #include "_I2C_driver_Adafruit_PWMServoDriver_setup.h" //not any changes //lite _I2C_driver_Adafruit_PWMServoDriver/
  358. #endif
  359. // put your setup code here, to run once:
  360. ARDUINO_SETUP_DEF_T HAS_LCD1602_A = false; //todo
  361. #if defined(HAS_LCD1602) or defined(HAS_LCD1602_I2C)
  362. #include "_LCD1602_setup.h"
  363. #endif
  364. ARDUINO_SETUP_DEF_T HAS_TFT_ILI9163C_A = false ; //todo
  365. #if defined(HAS_TFT_ILI9163C)
  366. #include "_TFT_ILI9163C_setup.h"
  367. #endif
  368. //BEGIN CAN
  369. #include "_CAN_setup.h" //lite _CAN/
  370. #if defined(HAS_LCD1602) or defined(HAS_LCD1602_I2C)
  371. /* todo
  372. LCDarray1 = "loop.... ";
  373. LCDarray2 = "....";
  374. LCD_print(LCDarray1, LCDarray2, LCDtim/10);
  375. */
  376. #endif
  377. #ifndef DISABLE_LOOP
  378. #include "__main_setup.h" //lite ___main/
  379. #endif
  380. #ifdef DISABLE_LOOP
  381. #include "___DEBUG/___DEBUG_DISABLE_SETUP.h"
  382. #endif
  383. }
  384. //#if Active_ControllerID == _ControllerID
  385. // byte data[8] = {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07};
  386. //#endif
  387. //String LCDarray1 ;
  388. //String LCDarray2 ;
  389. unsigned long time;
  390. #include "_LOOP_LATENCY_COUNTER.h" //lite ___loop/
  391. void loop() {
  392. register long time;
  393. time = millis();
  394. #include "___loop_init.h" //lite ___loop/
  395. #if defined(HAS_ROTTARY_SW)
  396. #include "_ROTTARY_SW_loop.h" //lite _ROTTARY_SW/
  397. #endif
  398. #ifdef DISABLE_LOOP
  399. #include "___DEBUG/___DEBUG_DISABLE_LOOP.h"
  400. #endif
  401. #include "__main_loop_top.h" //lite ___loop/
  402. #include "_SlaveID_loop1.h" //todo PCINT //lite ___loop/
  403. #include "_ControllerID_loop1.h" //todo make default //lite ___loop/
  404. #include "__main_loop_end.h" //lite ___loop/
  405. #if defined(HAS_SERIAL_PROXY)
  406. #include "SERIAL_PROXY__loop.h"
  407. #endif
  408. if(DEBUG_ACTION_TRIG != DEBUG_LAST_ACTION_TRIG) {
  409. #if defined(DEBUG_LAST_ACTION_TRIG_ENABLE)
  410. Serial.print(F("#534 DEBUG_ACTION_TRIG["));Serial.print(DEBUG_ACTION_TRIG);Serial.print(F("] ")); Serial.print(F("] LAST_DEBUG_ACTION_TRIG["));Serial.print(DEBUG_LAST_ACTION_TRIG);Serial.println(F("] "));
  411. #endif
  412. // Serial.print("] COUNTER__MAIN_A["); Serial.print(ARDUINO_LOOP_LATENCY_COUNTER__MAIN_A);
  413. // Serial.print("] COUNTER__MAIN_END_A["); Serial.print(ARDUINO_LOOP_LATENCY_COUNTER__MAIN_END_A);
  414. }
  415. DEBUG_LAST_ACTION_TRIG = DEBUG_ACTION_TRIG ;
  416. }
  417. #include "_PCINT_func_loop.h" //todo empty implement display etc
  418. #include "_Slave_Ports_func_loop.h" //todo implement