Off-grid Solar PV Panel project: Difference between revisions

From Sensors in Schools
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:


[[File:Screen Shot 2023-04-10 at 12.59.04 pm.png | 900px |link = https://www.dropbox.com/s/bwohfh2eh7ys14d/Arduino%20IDE%20installation3.mp4?dl=0 ]]
[[File:Screen Shot 2023-04-10 at 12.59.04 pm.png | 900px |link = https://www.dropbox.com/s/bwohfh2eh7ys14d/Arduino%20IDE%20installation3.mp4?dl=0 ]]
== Arduino LED Blink Program ==
* Program lights up Arduino UNO on-board LED connected to pin 13 for 1 second.
[[File:Screen Shot 2023-04-10 at 1.07.34 pm.png | 900px | link = https://www.dropbox.com/s/26b8stvdtpjz26c/Arduino%20LED%20Blink.mp4?dl=0 ]]
<syntaxhighlight lang="c++">
/*
  Blink
  Turns an LED on for one second, then off for one second, repeatedly.
*/
// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(13, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);  // turn the LED on (HIGH is the voltage level) = 1 = 5V supply
  delay(1000);                      // wait for 1 second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW = 0 = 0V supply
  delay(1000);                      // wait for 1 second
}
</syntaxhighlight>

Revision as of 03:14, 10 April 2023

First Lesson

Building a small scale Solar PV system using an Arduino

Arduino IDE Installation and Configuration on a Raspberry Pi

link = https://www.dropbox.com/s/bwohfh2eh7ys14d/Arduino%20IDE%20installation3.mp4?dl=0

Arduino LED Blink Program

  • Program lights up Arduino UNO on-board LED connected to pin 13 for 1 second.

link = https://www.dropbox.com/s/26b8stvdtpjz26c/Arduino%20LED%20Blink.mp4?dl=0

/*
  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

*/

// the setup function runs once when you press reset or power the board

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(13, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(13, HIGH);   // turn the LED on (HIGH is the voltage level) = 1 = 5V supply
  delay(1000);                       // wait for 1 second
  digitalWrite(13, LOW);    // turn the LED off by making the voltage LOW = 0 = 0V supply
  delay(1000);                       // wait for 1 second
}