This file contains 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
Hello World |
This file contains 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
a |
This file contains 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
long getDistance() { | |
long duration, d1, d2, d3, cm; | |
// The sensor is triggered by a HIGH pulse of 10 or more microseconds. | |
// Give a short LOW pulse beforehand to ensure a clean HIGH pulse: | |
digitalWrite(trigPin, LOW); | |
delayMicroseconds(2); | |
digitalWrite(trigPin, HIGH); | |
delayMicroseconds(80); // was 10 | |
digitalWrite(trigPin, LOW); | |
This file contains 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
int trigPin = 3; | |
int echoPin = 5; | |
long duration; | |
long distance; | |
long cm; | |
void setup() | |
{ | |
Serial.begin(9600); //this starts the talking | |
pinMode(trigPin, OUTPUT); //we will tell the |
This file contains 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
On |
This file contains 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
#pragma strict | |
function OnTriggerEnter (col : Collider) | |
{ | |
Application.LoadLevel(1); //loads level 1 when some object collides with this object's box-collider (added via the physics sub-menu) | |
} |
This file contains 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
Some Code Here |
This file contains 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
tone(9,660,100); | |
delay(150); | |
tone(9,660,100); | |
delay(300); | |
tone(9,660,100); | |
delay(300); | |
tone(9,510,100); | |
delay(100); | |
tone(9,660,100); | |
delay(300); |
This file contains 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
cat freq.txt | sed 's/ /,/g' | sed 's/[^0-9,d]//g' | sed 's/^,/tone(9,/g' | sed 's/$/);/g' | sed 's/d,/delay(/g' | sed 's/^);//g' >gist.txt |
This file contains 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
cat freq.txt | sed 's/ /,/g' | sed 's/[^0-9,d]//g' | sed 's/^,/tone(9,/g' | sed 's/$/);/g' | sed 's/d,/delay(/g' | sed 's/^);//g' >gist.txt |
OlderNewer