Contents
1. AdMoVeo in Processing
1.1. Example
1 import processing.serial.*;
2 import nl.tue.id.creapro.admoveo.*;
3
4 AdMoVeo admoveo;
5 int bgcolor = 255;
6
7 void setup()
8 {
9 admoveo = new AdMoVeo(this, "COM11");
10 admoveo.getLeftDistanceSensor().enable();
11 }
12
13 void draw()
14 {
15 background(0,0,bgcolor);
16 }
17
18 void inputAvailable(Sensor sensor, int oldValue, int newValue){
19 if(sensor == admoveo.getLeftDistanceSensor()){
20 bgcolor = newValue/4;
21 admoveo.getBlueLed().setPower(bgcolor);
22 }
23 }