I’m trying to use two arduino to simulate an ignition convert system,
something like ECU
the concepted circuit like below…
The right arduino is simulated as a signal to send RPM pulse from digital pin 2,
and use a pot VR to change the pulse speed.
The left arduino is simulated as a ignition system to read the pulse as interupt from the right arduino ,then calculate the RPM and map RPM to ten blocks of range from RPM 0~9999-> EEPROM address 0~9, then output pulse X times as ignition, which X is read from the EEPROM . etc as below.
RPM 0~999 will output ignition 3 times . 3 read from EEPROM address 0
RPM 1000~1999 will output ignition 3 times . 3 read from EEPROM address 1
RPM 2000~2999 will output ignition 3 times. 3 read from EEPROM address 2
RPM 3000~3999 will output ignition 2 times. 2 read from EEPROM address 3
RPM 9000~9999 will output ignition 1 time. 1 read from EEPROM address 9
Then I use the C++ to write an interface to monitor the current RPM and ignition times which send from the ignition arduino(left arduino), the arduino will consecutively send the protocol as “~RPM!Ignition times@” ,and software decode the protocol to display the values of RPM and ignition times.
look on the snapshot of the software, the echo message of the protocol “~RPM!Ignition times@” seems always lost in the transmission of serial port, and even when the RPM is up to several thousands , the echo frequency up, and the protocol lost more…i dont know how to solve this problem , is there any solution to not lost so much serial transmited data???
Then sometimes i write the EEPROM value of an specific address, the left arduino sometimes fail to read the command of “write EEPROM protocol”, it is also the transmission lost in the arduino end.
or the send echo process is conflited with the interupt signal from the right arduino??Or does anyone have better way to monitor the specific value form the arduino then print on the software??