The friendly Operating System for the Internet of Things
Arduino API

Implementation of the Arduino API in RIOT. More...

Detailed Description

Files

file  arduino.hpp
 Main interface definition of the Arduino API.
 
file  serialport.hpp
 Definition of the Arduino 'Serial' interface.
 

Enumerations

enum  { INPUT, OUTPUT, INPUT_PULLUP }
 Possible pin configurations. More...
 
enum  { LOW = 0, HIGH = 1 }
 Possible pin states. More...
 

Functions

void pinMode (int pin, int mode)
 Configure a pin as either input or output. More...
 
void digitalWrite (int pin, int state)
 Set the value for the given pin. More...
 
int digitalRead (int pin)
 Read the current state of the given pin. More...
 
void delay (unsigned long msec)
 Sleep for a given amount of time [milliseconds]. More...
 

Variables

static SerialPort Serial (UART_DEV(0))
 Primary serial port (mapped to UART_DEV(0))
 

Enumeration Type Documentation

anonymous enum
Enumerator
INPUT 

configure pin as input

OUTPUT 

configure pin as output

INPUT_PULLUP 

configure pin as input with pull-up resistor

Definition at line 34 of file arduino.hpp.

anonymous enum
Enumerator
LOW 

pin is cleared

HIGH 

pin is set

Definition at line 43 of file arduino.hpp.

Function Documentation

void delay ( unsigned long  msec)
Parameters
[in]msecnumber of milliseconds to sleep
int digitalRead ( int  pin)
Parameters
[in]pinpin to read
Returns
state of the given pin, HIGH or LOW
void digitalWrite ( int  pin,
int  state 
)
Parameters
[in]pinpin to set
[in]stateHIGH or LOW
void pinMode ( int  pin,
int  mode 
)
Parameters
[in]pinpin to configure
[in]modemode to set the pin to