Posts

code stuff

 This is my post [video] void setup() { // put your setup code here, to run once: //add serial communication Serial.begin(9600); //declaring digtal outputs for leds pinMode(9, OUTPUT); pinMode(10, OUTPUT); pinMode(11, OUTPUT); //setting up a digital input (pushbutton) pinMode(12, INPUT); digitalWrite(12, HIGH); } void loop() { // put your main code here, to run repeatedly: //is button being pressed? if (digitalRead(12) == 0) { //if so, is potentiometer in first third? if (analogRead(A0) < 350) { //if so, write high on 11, low on 9 and 10 digitalWrite(9, LOW); digitalWrite(10, LOW); digitalWrite(11, HIGH); } //in 2nd 3rd? if (analogRead(A0) > 350 && analogRead(A0) < 700) { digitalWrite(9, LOW); digitalWrite(10, HIGH); digitalWrite(11, LOW); } //in 3rd 3rd? if (analogRead(A0) > 700) { digitalWrite(9, HIGH); digitalWrite(10, LOW); digitalWrite(11,

My First Tinkercad Model: A Castle!

Image
 I created my very first (not actually but this is a demo) model in Tinkercad: A stylized castle / fortress!