Common Computer Science References
At the end of this lesson, you will be able to:
start to understand the basics of programming
go over what is a computer program
just a set of instructions
go over how to use the TinkerCad Arduino simulator
watch video, "Install Arduino IDE on Raspberry Pi"
watch video, "BLINKING THE ONBOARD LED - Arduino tutorial #1"
go over how to save your code and more importantly, how to back it up to GitHub
go over the Code Blocks chrome add-on
install the Arduino IDE on your raspberry Pi
install Linux on your ChromeOS desktop, then install arduino in it:
sudo apt install arduino -y
use the Code Blocks extension on Chrome
go over how to use the TinkerCad Arduino simulator
watch video, "Arduino - Built in LED"
yes, I know there is no sound!
for backing up your code to GitHub:
just copy and paste for people new to programming
if you have programmed before, you know this is a REALLY BAD idea
create repo 1st
clone down onto computer
watch video, "Backup Arduino code to GitHub"
for the document today, for the "schematic diagram" just leave blank
write the "Blink" program in TinkerCard Circuits
once working in the simulator, copy the code over to the Arduino IDE
flash your Arduino with the code
save the code and back it up to GitHub
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
if you finish early, write the "Blink" program in CircuitPython
this will help: https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython?view=all
look for "Blinky and a Button"
use NeoVim as your IDE in the teminal
sudo apt install neovim
create a repo and then clone it down onto your linux machine
git clone <URL of repo>
save your code to the Raspberry Pi, just like you did for Arduino
then use the same commands to back up to GitHub
git add -A
git commit -m "commit message"
git push origin main
I had to do the "reset" double tap trick after I saved my program the first time, to kick start the microcontroller into submission!