Example-Code for a generic Display Device (e.g. Sensor, Display)
More...
#include <avr/wdt.h>
#include <EEPROM.h>
#include <Wire.h>
#include "SSD1306Ascii.h"
#include "SSD1306AsciiWire.h"
#include <PJON.h>
Example-Code for a generic Display Device (e.g. Sensor, Display)
- Author
- drtrigon
- Date
- 2018-07-06
- Version
- 1.0
* OneWire PJON Generic "OWPG" scheme:
* Server e.g. linux machine or raspi
* OWPJON/LINUX/Local/LocalUDP/RemoteWorker/DeviceGeneric/
* OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/DeviceGeneric/
* Tunnel(er) similar to 1wire master (similar cause we are on a multi-master bus) e.g. AVR
* OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch/
* OWPJON/ARDUINO/Local/SoftwareBitBang/Tunneler/BlinkingSwitch_SWBB-TS/
* OWPJON/ARDUINO/Local/ThroughSerial/SoftwareBitBangSurrogate/Surrogate/ (obsolete)
* Devices e.g. AVR
* OWPJON/ARDUINO/Local/SoftwareBitBang/DeviceGeneric/
* OWPJON/ARDUINO/Local/SoftwareBitBang/OWP_DG_LCD_Sensors/ (this sketch)
* ...
*
* Compatible with: atmega328 (Uno, Nano), atmega32u4 (Yun)
*
* Pinout:
* 1wire PJON data bus (OWPJON SWBB):
* 1WIRE DATA -> Arduino Pin D12
* GND black -> Arduino GND
*
* Test on Ubuntu or Raspberry Pi Server (owpshell) confer the docu of
* following files:
* - @ref OWPJON/LINUX/Local/LocalUDP/RemoteWorker/DeviceGeneric/DeviceGeneric.cpp
* - @ref OWPJON/LINUX/Local/ThroughSerial/RemoteWorker/DeviceGeneric/DeviceGeneric.cpp
*
* Thanks to:
* gioblu - PJON 11.0 and support
* @see https://www.pjon.org/
* @see https://github.com/gioblu/PJON
* fredilarsen - support
*
#define SENSOR "owp:lcd:v1" |
unsigned long RAM_lRebootCount __attribute__ |
( |
(section(".noinit")) |
| ) |
|
PJON<SoftwareBitBang> bus |
( |
44 |
| ) |
|
OneWirePJON device status update function.
- Returns
- (void)
void receiver_function |
( |
uint8_t * |
payload, |
|
|
uint16_t |
length, |
|
|
const PJON_Packet_Info & |
packet_info |
|
) |
| |
Arduino IDE: put your setup code here, to run once.
unsigned long EEPROM_lPowerCount |
unsigned long EEPROM_lPowerCount_ |
unsigned long time_last_update |