Help - short pin value changes due reset and on/off Arduino Micro -

Hi Everyone!

Need your help!

There are 4 pulse mode devices which should properly work with Arduino Micro.
Devices are very stupid and has no any configuration. one pulse between 5-65 ms and it take a command.

Got a problem when I restart or turn on my Arduino Micro.

I get junk command to my pulse devices just Immediately after reset or turn it on. (Arduino).

All PinModes installed proper so I think it is some boot load pin check which switch pins before IDE program loads.

I have no ideas how to solve this in soft way. Some friends suggest hardware solution to make trimer before loading...

Any ideas to solve this first boot contact bounce in a time matter? 1-3 seconds will enough.

Many thanks for any help!

Give links for the devices and supply your code.

Weedpharma

Thanks for your feedback.

this is device https://www.eurocoin.co.uk/sites/default/files/downloads/Azkoyen%20Hopper%20UII%20-%20Parallel%20Protocol%20Rev%201%202011.pdf?download=1

Working in pulse mode.

IDE code doesn't matter. This problem could be repeated just by few lines.

Background: Devises connected just only by common ground and control pin. (2 pins total)

What investigate:

  1. Pinmode out - if this line in the code then devices take a command even i don't send arduino pin value; it happened just by 'control' pin line disconnection. some bounce or etc.

  2. When control line connected but take off arduino from USB - then Device take a command.

  3. Got interesting When i use http://lib.chipdip.ru/004/DOC001004461.pdf this TRSB-5VDC-SB-L15-R

It possible to avoid "USB arduino disconnection unlike command".

The working logic to take command is:

a: turn on TRSB device control line
b: make a pulse command (10 ms) HIGH)
c: turn OFF TRSB device control line
d command (10 ms) LOW)

but if i put D before C i got double command. so connection and disconnection Pulse device control line make unlike command. Don't know why. Maybe this is some Pulse protocol specific which i don't know how to care about.

https://www.eurocoin.co.uk/sites/default/files/downloads/Azkoyen%20Hopper%20UII%20-%20Parallel%20Protocol%20Rev%201%202011.pdf?download=1

This is the link to the device.

Please supply your code. We want to see what you are doing.

Weedpharma

void setup() {
// put your setup code here, to run once:
pinMode(05,OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:

delay(5000);

digitalWrite(5,HIGH);
delay(10);
digitalWrite(5,LOW);

delay(5000);
}

Would this maybe be more what you want?

void setup() {
  // put your setup code here, to run once:
pinMode(05,OUTPUT);
digitalWrite(5,LOW);
}

void loop() {
  // put your main code here, to run repeatedly:

delay(5000);

digitalWrite(5,HIGH);
delay(10);
digitalWrite(5,LOW);

delay(5000);
}

Do you realize that with the two 5 second delays inside your loop(), you will get a delay of 5 seconds after reset, then the rest of the time you will get a delay of 10 seconds.