Skip to content

Commit 0fe24b6

Browse files
committed
switch to the JeeLib.h header
1 parent 87df32e commit 0fe24b6

File tree

72 files changed

+86
-148
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+86
-148
lines changed

JeeLib.h

+5
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
#ifndef JeeLib_h
2+
#define JeeLib_h
3+
14
#include <Ports.h>
25
#include <RF12.h>
6+
7+
#endif

PortsLCD.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ class LiquidCrystalI2C : public LiquidCrystalBase {
137137
protected:
138138
virtual void config();
139139
virtual void send(byte, byte);
140-
virtual void write4bits(byte);
140+
virtual void #include <JeeLib.h>
141+
4bits(byte);
141142
};
142143

143144
#endif

PortsRF12.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Ports library remote interface to the RF12 wireless radio
22
// 2009-02-14 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include "RF12.h"
4+
#include <JeeLib.h>
65

76
void RemoteHandler::setup(uint8_t id, uint8_t band, uint8_t group) {
87
rf12_config();

RF12sio.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Streaming I/O layer on top of RF12 driver
22
// 2009-05-07 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h>
4+
#include <JeeLib.h>
65
#include <RF12sio.h>
76
#include <Arduino.h>
87

examples/Ports/accel2125_demo/accel2125_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Port interface to the Parallax Memsic 2125 Accelerometer #28017
22
// 2009-02-18 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
// the accelerometer has 2 pulse-modulated outputs tied to port 4
87

examples/Ports/analog_demo/analog_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Demo readout of the 4-channel 18-bit MCP3424 on the Analog Plug v2.
22
// 2009-09-28 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
PortI2C myI2C (3);
87
DeviceI2C adc (myI2C, 0x68);

examples/Ports/blink_demo/blink_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Demo of the BlinkPlug class
22
// 2009-12-09 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
BlinkPlug buttons (3);
87

examples/Ports/blink_ports/blink_ports.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Ports library demo, blinks leds on all 4 ports in slightly different ways
22
// 2009-02-13 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
Port one (1);
87
Port two (2);

examples/Ports/blink_recv/blink_recv.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Ports library demo, this is the receiver, see also the blink_xmit example
22
// 2009-02-14 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include "RF12.h"
4+
#include <JeeLib.h>
65

76
// the state received from the transmitter
87
RemoteNode::Data state;

examples/Ports/blink_xmit/blink_xmit.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Ports library demo, this is the transmitter, see also the blink_recv example
22
// 2009-02-14 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include "RF12.h"
4+
#include <JeeLib.h>
65

76
RemoteNode bob ('B', RF12_868MHZ);
87

examples/Ports/bmp085demo/bmp085demo.ino

+2-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
// see http://news.jeelabs.org/2010/06/20/battery-savings-for-the-pressure-plug/
1010
// see http://news.jeelabs.org/2010/06/30/going-for-gold-with-the-bmp085/
1111

12-
#include <Ports.h>
13-
#include "PortsBMP085.h"
14-
#include <RF12.h>
12+
#include <JeeLib.h>
13+
#include <PortsBMP085.h>
1514
#include <avr/sleep.h>
1615

1716
PortI2C two (2);

examples/Ports/bmp085recv/bmp085recv.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Receiver for the bmp085 demo sketch
22
// 2010-05-26 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h>
4+
#include <JeeLib.h>
65

76
typedef struct { int16_t temp; int32_t pres; } Payload;
87

examples/Ports/button_demo/button_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Show how the BlinkPlug's buttonCheck function works
22
// 2010-08-23 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
BlinkPlug blink (1);
87
MilliTimer everySecond;

examples/Ports/combi_demo/combi_demo.ino

+6-6
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ void loop() {
5757
// Ports demo, reads out a SHT11 sensor connected via "something like I2C"
5858
// 2009-02-16 <[email protected]> http://opensource.org/licenses/mit-license.php
5959

60-
#include <Ports.h>
61-
#include "PortsSHT11.h"
60+
#include <JeeLib.h>
61+
#include <PortsSHT11.h>
6262

6363
SHT11 hsensor (1);
6464

@@ -108,8 +108,8 @@ void loop() {
108108
// Ports demo, reads out a BMP085 sensor connected via I2C
109109
// 2009-02-17 <[email protected]> http://opensource.org/licenses/mit-license.php
110110

111-
#include <Ports.h>
112-
#include "PortsBMP085.h"
111+
#include <JeeLib.h>
112+
#include <PortsBMP085.h>
113113

114114
PortI2C two (2);
115115

@@ -154,7 +154,7 @@ void loop() {
154154
// Ports demo, reads out a digital PIR sensor signal and an analog LDR voltage.
155155
// 2009-02-17 <[email protected]> http://opensource.org/licenses/mit-license.php
156156

157-
#include <Ports.h>
157+
#include <JeeLib.h>
158158

159159
Port pir (3); // PIR sensor is connected to DIO (pin 2) of port 3
160160
// to demo analog I/O, connect an LDR from AIO to GND
@@ -191,7 +191,7 @@ void loop() {
191191
// Ports demo, interface to Nintendo's "Nunchuk", which simply uses I2C inside
192192
// 2009-02-17 <[email protected]> http://opensource.org/licenses/mit-license.php
193193

194-
#include <Ports.h>
194+
#include <JeeLib.h>
195195

196196
PortI2C four (4, PortI2C::KHZ100);
197197

examples/Ports/dcf77demo/dcf77demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// Port demo, DCF77 radio signal decoder
22
// 2009-02-26 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
4+
#include <JeeLib.h>
55
#include <avr/pgmspace.h>
6-
#include <RF12.h> // needed to avoid a linker error :(
76

87
Port DCF77 (1);
98

examples/Ports/dcmotor_demo/dcmotor_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Demo for the DC Motor Plug
22
// 2010-11-18 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
PortI2C myport (1 /*, PortI2C::KHZ400 */);
87
DeviceI2C expander (myport, 0x26);

examples/Ports/dimmer_demo/dimmer_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Demo for the Dimmer plug
22
// 2010-03-18 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
PortI2C myBus (1);
87
DimmerPlug dimmer (myBus, 0x40);

examples/Ports/eemem/eemem.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
// pin 6: SCL, AIO, port pin 5
1111
// pin 8: +3V, port pin 4
1212

13-
#include <Ports.h>
14-
#include <RF12.h> // needed to avoid a linker error :(
13+
#include <JeeLib.h>
1514

1615
PortI2C myport (4730);
1716
DeviceI2C eemem (myport, 0x50);

examples/Ports/expander/expander.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
//
44
// see http://www.jeelabs.org/2009/07/07/io-expander/
55

6-
#include <Ports.h>
7-
#include <RF12.h> // needed to avoid a linker error :(
6+
#include <JeeLib.h>
87

98
PortI2C myport (1 /*, PortI2C::KHZ400 */);
109
DeviceI2C expander (myport, 0x20); // also works with output plug if 0x26/0x27

examples/Ports/glcd_demo/glcd_demo.ino

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
// Demo display for the Graphics Boad
22
// 2010-11-14 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include "ST7565.h"
5-
#include <Ports.h>
6-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <ST7565.h>
5+
#include <JeeLib.h>
76

87
ST7565 glcd(14, 4, 17, 7);
98

examples/Ports/gravity_demo/gravity_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Demo of the Gravity Plug, based on the GravityPlug class in the Ports library
22
// 2010-03-19 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h>
4+
#include <JeeLib.h>
65

76
PortI2C myBus (1);
87
GravityPlug sensor (myBus);

examples/Ports/h48c_demo/h48c_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Ports demo, reads out the Parallax H48C 3-axis accelerometer #29123
22
// 2009-02-19 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
class H48C : private Port {
87
Port enable;

examples/Ports/heading_demo/heading_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Demo of the Heading Board based on the HDPM01 (with barometer and compass)
22
// 2010-03-22 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
HeadingBoard sensor (4);
87
MilliTimer measureTimer;

examples/Ports/highside/highside.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Experimental code to control four high-side DC power switches.
22
// 2011-06-05 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h>
4+
#include <JeeLib.h>
65

76
#define CHANNELS 1
87

examples/Ports/hm55b_demo/hm55b_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Ports demo, reads out the Parallax HM55B compass module #29123
22
// 2009-02-19 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
class HM55B : private Port {
87
Port enable;

examples/Ports/indoor/indoor.ino

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// Example indoor temp + humidty + barometer, mounted on a Graphics Board
22
// 2010-11-17 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include "ST7565.h"
5-
#include <Ports.h>
4+
#include <ST7565.h>
5+
#include <JeeLib.h>
66
#include <PortsBMP085.h>
77
#include <PortsSHT11.h>
8-
#include <RF12.h> // needed to avoid a linker error :(
98

109
ST7565 glcd(14, 4, 17, 7);
1110
SHT11 th_sensor (3); // port 3

examples/Ports/input_demo/input_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Demo for the input plug - read 16 analog input channels once a second
22
// 2010-04-19 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
InputPlug input (1);
87

examples/Ports/ir_recv/ir_recv.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Infrared receiver using the InfraredPlug class (polled version)
22
// 2010-10-12 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
InfraredPlug ir (2);
87
byte value;

examples/Ports/ir_recv_irq/ir_recv_irq.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Infrared receiver using the InfraredPlug class (interrupt version)
22
// 2010-10-12 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
InfraredPlug ir (2);
87
byte value;

examples/Ports/ir_repeater/ir_repeater.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Record an IR command using an Infrared Plug, and repeat it 3x.
22
// 2010-11-11 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
InfraredPlug ir (2);
87
byte outBuf[250];

examples/Ports/isp_capture/isp_capture.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
// - Ignore fuse reads in playback mode, because they may differ, depending on
2828
// what they were previously set to (can use serial hookup to see details).
2929

30-
#include <Ports.h>
31-
#include <RF12.h> // needed to avoid a linker error :(
30+
#include <JeeLib.h>
3231
#include <avr/sleep.h>
3332

3433
// set to 1 to get some more output on the serial port during playback

examples/Ports/lcd_demo/lcd_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Demo sketch for an LCD connected to I2C port via MCP23008 I/O expander
22
// 2009-10-31 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <PortsLCD.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
PortI2C myI2C (1);
87
LiquidCrystalI2C lcd (myI2C);

examples/Ports/lux_demo/lux_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Demo of the Lux Plug, based on the LuxPlug class in the Ports library
22
// 2010-03-18 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
PortI2C myBus (1);
87
LuxPlug sensor (myBus, 0x39);

examples/Ports/memory_demo/memory_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Demo of the MemoryPlug and MemoryStream classes
22
// 2009-12-11 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
// pressing button 1 replays the collected data
87
// pressing button 2 clears the data

examples/Ports/nunchuk_demo/nunchuk_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Ports demo, interface to Nintendo's "Nunchuk", which simply uses I2C inside
22
// 2009-02-17 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h> // needed to avoid a linker error :(
4+
#include <JeeLib.h>
65

76
PortI2C four (4, 15 /*PortI2C::KHZ100*/);
87

examples/Ports/opto_demo/opto_demo.ino

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Demo of the opto-coupler plug
22
// 2010-09-26 <[email protected]> http://opensource.org/licenses/mit-license.php
33

4-
#include <Ports.h>
5-
#include <RF12.h>
4+
#include <JeeLib.h>
65

76
Port optoIn (3), optoOut (4), testIn (2), testOut (1);
87
byte state; // counts on each cycle, bits 3..0 used as test signals

0 commit comments

Comments
 (0)