gaDigitalRead(int)

Syntax

gaDigitalRead(int)

Example

dPin = 9
inputValue = 0
 
function setup()
 ofSetCircleResolution(6)
end
 
function update()
 // get the readings from arduino digital pin 9
 inputValue = gaDigitalRead(dPin)
end
 
function draw()
 gaBackground()
 
 ofSetColor(255)
 ofFill()
 ofCircle(OUTPUT_W/2,OUTPUT_H/2,inputValue*200)
end

Description

This give us the readings in realtime over the arduino digital pin specified.

Parameters

int

Returns

«Int, The digital value from the specified pin. 0 or 1