Advertisement
mivebe

Arduino Hello World

Nov 24th, 2023
1,029
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Arduino 0.71 KB | Software | 0 0
  1.  
  2. unsigned int example = 65535;
  3.  
  4. void setup() {
  5.   pinMode(LED_BUILTIN, OUTPUT);
  6.  
  7.   Serial.begin(9600);
  8.   Serial.println("");
  9.   Serial.print("The example unsigned int is : ");
  10.   Serial.println(example);
  11.   Serial.print("Size of unsigned int = ");
  12.   Serial.println(sizeof(example));
  13. }
  14.  
  15. void loop() {
  16.   digitalWrite(LED_BUILTIN, HIGH);
  17.   delay(1000);
  18.   digitalWrite(LED_BUILTIN, LOW);
  19.   delay(2000);
  20.  
  21.   digitalWrite(LED_BUILTIN, HIGH);
  22.   delay(100);
  23.   digitalWrite(LED_BUILTIN, LOW);
  24.   delay(100);
  25.   digitalWrite(LED_BUILTIN, HIGH);
  26.   delay(100);
  27.   digitalWrite(LED_BUILTIN, LOW);
  28.   delay(100);
  29.   digitalWrite(LED_BUILTIN, HIGH);
  30.   delay(100);
  31.   digitalWrite(LED_BUILTIN, LOW);
  32.   delay(2000);
  33. }
  34.  
Tags: Arduino test LED
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement