-
Notifications
You must be signed in to change notification settings - Fork 1
/
hello.pde
37 lines (30 loc) · 893 Bytes
/
hello.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Telepulssi template for Processing.
*/
Telepulssi telepulssi;
public void settings() {
// Telepulssi screen resolution is 40x7
size(40, 7);
}
void setup() {
// First set up your stuff.
background(0);
// Initialize real Telepulssi, emulated one, or both. Pick the on you like to use
//telepulssi = new Telepulssi(this, true, "/dev/ttyACM0"); // Preview and real hardware
telepulssi = new Telepulssi(this, true, null); // Preview only
//telepulssi = new Telepulssi(this, false, "/dev/ttyACM0"); // Real hardware only
// Hide the original window
surface.setVisible(false);
}
void draw() {
// Do something fancy like rotating text
background(0);
pushMatrix();
translate(width*0.5, height*0.5);
rotate(frameCount / 20.0);
textSize(7);
text("Hello", 0, 0);
popMatrix();
// Finally update the screen and preview.
telepulssi.update();
}