Skip to content

Instantly share code, notes, and snippets.

View tboydar's full-sized avatar
🎯
Focusing

Dar tboydar

🎯
Focusing
View GitHub Profile
int timer = 0;
void setup() {
size(300, 300);
}
void draw() {
background(255);
fill(0);
textSize(20);
// Click within the image to change
// the value of the rectangle after
// after the mouse has been clicked
int value = 255;
PImage img;
int mode = 0;
int keyMode = 0;
#include <Servo.h>
Servo myservo;
int trigPinABC = 12; // Trig Pin
int echoPin = 13; // Echo Pin
long duration, cm, inches;
void setup() {
Serial.begin (9600); // Serial Port begin win com X /
myservo.attach(9);
@tboydar
tboydar / gist:870aa7308c3de9160bb949169d22b0f1
Created October 8, 2018 09:23
arduino leonardo keyboard
#include "Keyboard.h"
void setup() {
Keyboard.begin();
delay(3000);
for( int i = 0 ; i< 5 ;i++){
Keyboard.press(218);
delay(100);
Keyboard.release(218);
}
int x = 100, y=100;
void setup() {
size(300, 300);
}
void draw() {
rect(x, y, 30, 30);
}
void keyPressed() {
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
Serial.println(analogRead(A0));
digitalWrite(13, HIGH);
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(100);
digitalWrite(13, LOW);
delay(100);
}
int a = 1;
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
a = a + 1;
int a = 1;
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
a = a + 1;
if( a > 255){
a = 1;
int a = 1;
void setup() {
pinMode(13,OUTPUT);
}
void loop() {
a = a + 1;