Using tabs to organize code with the Arduino IDE
Programming Electronics Academy Programming Electronics Academy
232K subscribers
57,410 views
1.9K

 Published On Apr 24, 2022

🤩 FREE Arduino Crash Course 👇👇
https://bit.ly/get_Arduino_skills

✅ Sign up to get $100 on NextPCB: https://www.nextpcb.com/register?code...
✅ $0 for 1-4 layers PCBs: https://www.nextpcb.com/pcb-quote?act...
✅ PCB Assembly capabilities info:
https://www.nextpcb.com/pcb-assembly-...

**Want to learn more? Check out our courses!**
https://bit.ly/3vJ80um

Arduino Sketch Build Process Website:
https://arduino.github.io/arduino-cli...

**Get the code, transcript, challenges, etc for this lesson on our website**
https://bit.ly/3EFdfix

**We designed this circuit board for beginners!**
Kit-On-A-Shield: https://amzn.to/3lfWClU

SHOP OUR FAVORITE STUFF! (affiliate links)
---------------------------------------------------

We use Rev Captions for our subtitles
https://bit.ly/39trLeB

Arduino UNO R3:
Amazon: https://amzn.to/37eP4ra

Budget Arduino Kits:
Amazon:https://amzn.to/3C0VqsH

Multimeter Options:
Amazon: https://amzn.to/3rRo3E0

Helping Hands:
Amazon: https://amzn.to/3C8IYXZ

Soldering Stations:
Amazon: https://amzn.to/2VawmP4

AFFILIATES & REFERRALS
---------------------------------------------------
►Audible Plus Free trial: https://amzn.to/3j5IGrV
►Get LastPass: https://lastpass.wo8g.net/b3N1vk
►Join Honey- Save Money https://bit.ly/3xmj7rH
►Download Glasswire for Free:https://bit.ly/3iv1fql


FOLLOW US ELSEWHERE
---------------------------------------------------
Facebook:   / programmingelectronicsacademy  
Twitter:   / progelecacademy  
Website: https://www.programmingelectronics.com/
________________________________
Did you know in the Arduino IDE that you can organize your code using different tabs? In this lesson, you’re gonna learn how to add these tabs, how they get organized in the Arduino sketch folder and how to use them in order to better organize your code. Stay tuned. Before we get started, if you wouldn’t mind subscribing to the channel, it really helps us bring you the best content. It doesn’t cost you anything but a click and it allows us to keep doing this. All right, so here we are in the Arduino IDE. I’ve got a program open. It’s called Tabbatha and I have got a sketch written out. So, let me just familiarize you with the sketch so you kind of get an idea what’s going on. So I’ve got some neopixels. Those are individually addressable LEDs. It’s like an individually addressable LED strip. You’ve probably seen ’em around. Really cool looking. And I’ve using this library called fastLED to control them. And I’ve got some variables here that set up the number of pins and which data pin I’m using and and a array to store the different LEDs that I’m in. Okay, and then I have some functions that do some different things. So one is setting them all the LEDs red. Then one sets ’em all blue, one sets ’em all green but it uses this little fadeall function in here that kind of makes it interesting. And I also have that function right here, fadeall. So I’ve got four functions and then below that I have my setup in my loop. So in setup, you know just start serial communication and then I’m just initializing some stuff for that fastLED library. Nothing crazy going on in setup. And then loop, all I’m doing is I’m calling these three functions: setRed, setBlue and setGreen. Okay, so what I wanna do is I wanna you know there’s a lot kind of, I don’t know, going on in here. Maybe I wanna like reduce the clutter in here and let’s say I wanna put each one of these functions in its own file, in its own tab. All right, so all of the files that you create in Arduino are gonna live in the Arduino Sketchbook folder. And you can figure out where your Sketchbook folder is by going to if you’re on a Mac, you’d go to Arduino Preferences or if you’re on a PC, I think it’s File Preferences. And the first thing they show is your Sketchbook location. So the location of my Sketchbook folder is under my name, my documents, and then in a folder Arduino. And then I have saved Tabbatha somewhere inside this folder. So I’m gonna go ahead and open that up. All right, so here is the folder Tabbatha and you’ll notice I’ve got a .eno
CONTINUED...
https://bit.ly/3EFdfix


**About Us:**
This Arduino lesson was created by Programming Electronics Academy. We are an online education company that seeks to help people learn about electronics and programming through the ubiquitous Arduino development board.

**We have no affiliation whatsoever with Arduino LLC, other than we think they are cool.**

show more

Share/Embed