wget https://storage.googleapis.com/golang/go1.9.linux-armv6l.tar.gz
sudo tar -C /usr/local -xzf go1.9.linux-armv6l.tar.gz
export PATH=$PATH:/usr/local/go/bin # put into ~/.profile
source ~/.profile #permanently add PATH to profile
go get github.com/github/git-lfs
cp gocode/bin/git-lfs /usr/bin #might have to run this command as sudo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unsigned long lastTime = 0; | |
| int seconds = 0; | |
| int minutes = 0; | |
| void setup() { | |
| Serial.begin(9600); | |
| pinMode(LED_BUILTIN, OUTPUT); | |
| } | |
| void loop() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unsigned long lastTime = 0; | |
| int seconds = 0; | |
| void setup() { | |
| Serial.begin(9600); | |
| } | |
| void loop() { | |
| if (millis() - lastTime >= 1000) { | |
| seconds++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let lastTime = 0; | |
| let seconds = 0; | |
| function setup() { | |
| createCanvas(400, 400); | |
| textAlign(CENTER, CENTER); | |
| textSize(64); | |
| } | |
| function draw() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void loop() { | |
| Serial.println("Hello!"); | |
| delay(1000); // Wait 1 second before looping again | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| unsigned long lastTime = 0; | |
| void loop() { | |
| if (millis() - lastTime > 1000) { | |
| Serial.println("One second has passed!"); | |
| lastTime = millis(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let lastTime = 0; | |
| function draw() { | |
| if (millis() - lastTime > 1000) { | |
| console.log("One second has passed!"); | |
| lastTime = millis(); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void loop() { | |
| unsigned long t = millis(); | |
| Serial.println("Time elapsed: " + String(t) + "ms"); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function draw() { | |
| let t = millis(); | |
| console.log("Time elapsed: " + t + "ms"); | |
| } |
#General rules for working with shaders in OpenFrameworks
- in main.cpp, set the GL version to 3,2:
ofGLWindowSettings settings;
settings.setGLVersion(3,2);
ofCreateWindow(settings);
- in ofApp.h, declare your shader member variable:
ofShader shader;
NewerOlder