Computing stuff tied to the physical world

Docs » class Port


Part of the Ports library.


The Port class represents the software side of a standard "port" header on JeeNode's and JeeLink's.


There are 4 ports on a JeeNode / JeeLink, numbered 1 through 4.


Example definition:

    Port led (3);


Once a port object has been defined, it can be used to access I/O pins for various tasks.


Member functions


Port mode()

define DIO as input or output pin

Port digiRead()

read value of the DIO pin

Port digiWrite()

set value of the DIO pin

Port anaWrite()

set up PWM on DIO pin (only specific ports)

Port pulse()

measure pulse length on DIO pin

Port mode2()

define AIO as input or output pin

Port anaRead()

read analog value on AIO pin

Port digiread2()

read digital level on the AIO pin

Port digiWrite2()

set digital level on the AIO pin

Port pulse2()

measure pulse length on the AIO pin

Port shift()

send 8 bits out the DIO pin while pulsing the AIO pin

Port shiftRead()

pulse AIO pin and read a number of bits from the DIO pin

Port shiftWrite()

pulse AIO pin and write a number of bits to the DIO pin

Port mode3()

define IRQ as input or output pin (static member)

Port digiRead3()

read digital level on the IRQ pin (static member)

Port digiWrite3()

set digital level on the IRQ pin (static member)



page index