diff options
author | Christian Pointner <equinox@spreadspace.org> | 2016-05-06 23:04:39 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2016-05-06 23:04:51 +0200 |
commit | c9dd7522c0fa587558136de08d48ccfe5765ac42 (patch) | |
tree | f3babbbfd0bf1ecd760d308216760bbd5cef9ec4 /serial-pjon/serial-pjon.cpp | |
parent | updated copyright header (diff) |
upgraded to PJON v3
Diffstat (limited to 'serial-pjon/serial-pjon.cpp')
-rw-r--r-- | serial-pjon/serial-pjon.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/serial-pjon/serial-pjon.cpp b/serial-pjon/serial-pjon.cpp index 328a930..48b1cf3 100644 --- a/serial-pjon/serial-pjon.cpp +++ b/serial-pjon/serial-pjon.cpp @@ -33,7 +33,7 @@ #include "Arduino.h" #include "PJON.h" -PJON bus(8); // Bus connection to pin 8 +PJON<SoftwareBitBang> bus; void error_handler(uint8_t code, uint8_t data) { if(code == CONNECTION_LOST) { @@ -95,9 +95,10 @@ int main(void) sei(); arduino_init(); - bus.begin(); bus.set_error(error_handler); bus.set_receiver(recv_handler); + bus.set_pin(8); + bus.begin(); for(;;) { int16_t BytesReceived = serialio_bytes_received(); |