You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Hi Daniel,

    No problem - when you supply an array to digitalPulse, you're actually specifying [up_time,down_time,up_time,down_time,...], and you probably want a fixed gap between pulses, so to send 110 you probably want something like:

    var gap = 0.5;
    digitalPulse(A6, 1, [1,gap,1,gap,0.6]);
    

    Note that the code checks d>0.0008, but because it's the real world the timings won't be accurate. You want to leave some leeway (maybe 0.2ms?) - so when sending a 0 maybe send 0.6 and for a 1 send 1.0.

About

Avatar for Gordon @Gordon started