Binary coded decimal output controlled by a serial command
i have project in mind requires 4 bit bcd output select integer between 1-15. plan use pins d2-d5 , toggle them on/off needed output need device.
the planned usage had in mind send serial command raspberry pi argument desired integer, example if wanted select integer 1, send "1" argument, , send pin d2 high. using arduino nano plugged in via usb.
i wasn't real sure if feasible or begin, i've started looking @ , able basic comm code:
if open serial monitor , send "1" echoes in ascii (49). i'm not real sure on go here or efficient way toggle pins needed depending on number sent.
the planned usage had in mind send serial command raspberry pi argument desired integer, example if wanted select integer 1, send "1" argument, , send pin d2 high. using arduino nano plugged in via usb.
i wasn't real sure if feasible or begin, i've started looking @ , able basic comm code:
code: [select]
int serialdata = 0;
void setup()
{
serial.begin(9600);
}
void loop()
{
if (serial.available() > 0)
{
serialdata = serial.read();
serial.println(serialdata);
}
}
if open serial monitor , send "1" echoes in ascii (49). i'm not real sure on go here or efficient way toggle pins needed depending on number sent.
you lost me this:
thinking second or 2 says output 4 bits directly rpi's gpio. why bother nano , comms?
quote
the planned usage had in mind send serial command raspberry pi argument desired integer, example if wanted select integer 1, send "1" argument, , send pin d2 high. using arduino nano plugged in via usbif nano plugged rpi usb port, serial come , go to? how block diagram showing pieces, interconnects , distance between them?
thinking second or 2 says output 4 bits directly rpi's gpio. why bother nano , comms?
Arduino Forum > Using Arduino > Project Guidance > Binary coded decimal output controlled by a serial command
arduino
Comments
Post a Comment