summaryrefslogtreecommitdiff
path: root/serial-pjon
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2016-05-06 23:04:39 +0200
committerChristian Pointner <equinox@spreadspace.org>2016-05-06 23:04:51 +0200
commitc9dd7522c0fa587558136de08d48ccfe5765ac42 (patch)
treef3babbbfd0bf1ecd760d308216760bbd5cef9ec4 /serial-pjon
parentupdated copyright header (diff)
upgraded to PJON v3
Diffstat (limited to 'serial-pjon')
-rw-r--r--serial-pjon/serial-pjon.cpp5
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();