Two talking codebugs

Post your projects here
Post Reply
mikerr
Posts: 83
Joined: Fri Jul 31, 2015 10:37 am
Contact:

Two talking codebugs

Post by mikerr » Thu Oct 15, 2015 1:50 pm

Here's VERY simple comms between two codebugs:

Image
https://www.youtube.com/watch?v=G1XbFfA6tdY

Ultra simple comms - it's just measuring the length of a "pulse" sent from one to another, and using that number as the data.


Pin 1 is output
Pin 0 is input with internal pullups disabled
and a "pull down" resistor across pin 0 and GND

Only one bug has a battery in it, one powers the other via the bottom header
- this helps greatly with synchronization too, since they are both turned on at the same time.

http://www.codebug.org.uk/explore/codeb ... bug-comms/

No doubt needs a better protocol and sync to be of more use,
but I wanted the first sketch to be short and simple (KISS)
Twitter @mikered codebug profile mikerr

mikerr
Posts: 83
Joined: Fri Jul 31, 2015 10:37 am
Contact:

Re: Two talking codebugs

Post by mikerr » Tue Oct 20, 2015 3:24 pm

Just thinking this might be a way to get arduino & codebug talking
instead of the i2c method ( which uses codebug as a slave)
Twitter @mikered codebug profile mikerr

BMS Doug
Posts: 61
Joined: Wed Aug 26, 2015 8:54 am
Contact:

Re: Two talking codebugs

Post by BMS Doug » Wed Oct 21, 2015 7:35 am

it's good stuff Mike, Very Nice.

you could probably run a slight modification of the same program to omit the pulldown resistor, just hold the transmit leg high until you want to send a signal and transmit your pulse by dropping it low.

Post Reply