162x Filetype PDF File size 0.48 MB Source: thinkcrate.co
A program, is a set of instructions. Arduino programming is about getting your Arduino to followa set of instructions, telling it what to do. Tell Arduino what to do Code Development environment • Also known as • Also known as Arduino IDE programs, or (Arduino Integrated Development “sketches” Environment) • Simplified version of • Translates your code (compiles) C programming • Sends translated code to the language Arduino (upload) /* Blink Turns on an LED on for one second, then off for one second, repeatedly. This example code is in the public domain. */ // Pin 13 has an LED connected on most Arduino boards. // give it a name: int led = 13; // the setup routine runs once when you press reset: void setup() { // initialize the digital pin as an output. pinMode(led, OUTPUT); } // the loop routine runs over and over again forever: void loop() { digitalWrite(led, HIGH); // turn the LED on by making the voltage HIGH delay(1000); // wait for 1 second digitalWrite(led, LOW); // turn the LED off by making the voltage LOW delay(1000); // wait for 1 second }
no reviews yet
Please Login to review.