gaAnalogRead(int)

Syntax

gaAnalogRead(int)

Example

aPin = 1
inputValue = 0

function setup()
    ofSetCircleResolution(6)
end

function update()
    // get the readings from arduino analog pin 1
    inputValue = gaAnalogRead(aPin)
end

function draw()
    gaBackground()
    
    ofSetColor(255)
    ofFill()
    ofCircle(OUTPUT_W/2,OUTPUT_H/2,inputValue*200)
end

Description

This is the reading in realtime over the selected arduino analog pin, normalized in 0.0 - 1.0 range

Parameters

int

Returns

«Float, The value from the specified analog pin, normalized in 0.0 - 1.0 range