I've been banging my head on the keyboard for a couple days trying to figure this out. I watched several videos that didn't help. THANK YOU!!! It's so much simpler than I thought.
I like it! This will make long sketches more manageable and easier to debug. I have an old non-Arduino program that I will rewrite as a sketch - it's 400 lines long. I'll use tabs.
@@programmingelectronics Hey I was wondering if you could tell if I can use Pre Processors to eliminate inter-dependencies of files which have classes in it. I would really appreciate if you can tell me something about it. Thank you so much for making these videos, it has really helped a lot.
Test_WemosD1mini:501:6: error: expected unqualified-id before numeric constant 501 | void 3countSTARTUP(); 1 or 01 prefix trigger an error, good tips but it doesn't seem to work on IDE1.8.19....! Must use letter prefix like: void A_myfunction();
@@programmingelectronics Hey, I am wondering why is that we cannot use numbers in functions /names? Because I guess today compilers are advanced enough to differentiate between functions and stuff right?
Thanks a lot for this! I have been coding Arduino for a while, and I didn't know about this! I guess this is what they call modular programming. It helps a lot to break things up in smaller, digestible pieces.
There was a question about if you could set up tabs, so that the functions could be used in other programs - and update in all the programs when the tab was updated - like a library (The comment disappeared when I was attempting to reply - my bad!). This would be really pretty cool, but unfortunately it wouldn't work. You'd need to have copies of that .ino file in every sketch folder where you wanted to use it , and then every one of the files would need updated if you made changes. In that case, setting it up like a library would be the way to go.
So excited, I comment first. I really hunger for this, didn't wrap my head around it first time, hopefully this time I'll due to my trust in your teachings. Because of your awesome teaching I ditched using delays despite it being a difficult habit to leave. Greetings from Tanzania 🇹🇿 With "Royal Tour" :)
Cool demonstration. This is a better approach to writing functions for your sketches. It will minimize scrolling to writing code blocks in one file and improve the writing process.
I'm new to programming in general, but I have read something about organizing our program. Help, I have questions : 1. since it works in alphabetically order, do we have to adjust the filename according to the program order (following which function come first in the source code) ? 2. what's the difference of calling function from this Tab method, and calling function from library/class (if I make a new file as a library) ? Thank you very much for your clear and comprehensive tutorial, BTW
@@programmingelectronics Unfortunately, Tab is not without its own issues, I am finding. Seems to add another level to debug unless the content of the tab is very simple. As ever, tenacity is required
Very helpful as i am just getting to splitting up larger files and searching the Arduino was not producing applicable results. Your video was clear and consise..
Thanks for this tutorial, is kinda the concept of "MVC/MVVM" Controller structure for organizing code in iOS/Swift ...this is the way for any Object Oriented Programming ;) ...I like so much your teaching skills and I hope you would be the one starting teaching Swift and Arduino with the SwiftIO board architecture 🙏🏼
I have struggled with this for a couple of weeks: A previously working sketch threw hundreds of errors when split into tabs. My problem was that I appear to have fallen into the "rare cases" category, and had to manually add the prototypes up near my includes. Subscribed.
Very useful! Thanks. I wish that Visual Studio had the same. With VS you can create 'Regions' which does help but this tab thing is better. I make classes in VS but it's less convenient to use than these tabs.
Whats the difference between making a library and this? When I was looking for a solution like this I came across making a .cpp file and .h to make a library but this seems so much easier So I was wondering what differences they had and why you would choose one over the other
Great question! CRGB is an object in the FastLED library - it lets you control paraments of an an RGB led, so we are making an array of those objects so we can control the colors of the entire LED strip. He are some docs on it. github.com/FastLED/FastLED/wiki/Pixel-reference#crgb
Very clear and helpful explanation of how to make a big sketch more manageable. Can you do one on how to then migrate those multi-tab sketches from Arduino IDE to Platform IO?
The tabs were kind of a mystery, having come from a mostly Visual Studio background. My first experience with the Arduino IDE was 3d printing related, working with the .h files for configuring Marlin code. Nice to understand they are like pages essentially. I'm starting to use them now. Thanks.
I have been hoping someone would explain the tabs Thank you so much!! would you mind also touching on local and global variables in the tabs with public and private, I am trying to understand this part of the tabs Thank you again for all your help !!
Great question! Yes they can. We did a previous video on organizing code that talks about adding function prototypes prior to setup if you go that route which a lot of folks prefer.
Hello sir, I have a code for ws2812b led which has 12 effects change by push button. But when i off and on it again it's start from frist effect. I I want that when I turn it on it should be on the same last effect on which it was turned off. Please help me 🙏🙏
Is there a precedent for putting a library in a tab? I seem to recall seeing someone referring back and forth to a library to ensure they had the correct spelling or syntax. Using a tab made that very quick and easy?
Great question Jeff! To be perfectly honest I am not sure if there is a precedent/convention on that or not, but I could see it being handy for sure. Side note, I believe in order to open a .h or .cpp file in the Arduino IDE, those files would need to be in the sketch folder associated with sketch, and not in the libraries folder where libraries typically reside.
@@programmingelectronics Including the version of the library you used directly in your sketch folder would probably avoid conflicts resulting from later changes or upgrades to the libraries maintained in your Documents folder.
@@jeffschroeder4805 I had exactly the same question Jeff. But I wouldn't want to have to place a copy of a library (.h or .cpp) in the sketch folder using it - just a link would be preferable (unless you really wanted to include a local copy of a version of that library for some reason). An even better way would simply be to tell the IDE in some way to just display the library code (.cpp and/or .h) as a tab within that sketch (but not to concatenate the source code to it). What I currently do if I want to readily refer to an included library while writing a sketch that uses it is to open the library source file in a Notepad++ window.
I don’t think you can add .h tabs (though I could be wrong). I believe you’d have to create the header file and save it as a .h in the same sketch folder.
Mmnh 🤔, second comment after watching, this is helpful as in "good to know" but not what I hunger for. Please create another tutorial on using header files (.h), just like classes
Hello could you please help me out with this error Arduino: 1.8.19 (Mac OS X), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None" exec: "python": executable file not found in $PATH Error compiling for board ESP32 Dev Module. This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.
It is a great feature, but the UI for it is horrendous! The option is on the top right under a tiny button, instead of in the main menus?? (I won't even talk about THOSE... what a mess!) Then instead of a pop up dialog, you enter the new name in a field at the BOTTOM of the screen??? Come on, Arduino, hire someone with common sense to FIX your User Inteface.
Hi to all. I have problem in coding because I don't have enough knowledge. If any of you is interested , I can explain my problem and send my code that I already have . Thanks
I chuckled to my self when you pulled out that 'TabbaDabba'. Thanks for helping us stay a little more organized.
Thanks for the note Shawn! I try not to take myself too seriously and have some fun occasionally :)
You had me at FastLED LOL. And now I'm clear on tabs, prototypes and preprocessing. Another great tutorial, thank you!
Thanks so much - Glad it helped and thanks for the note!
I've been banging my head on the keyboard for a couple days trying to figure this out. I watched several videos that didn't help. THANK YOU!!! It's so much simpler than I thought.
Glad it helped! Thanks for the note and thanks for watching!
A large sketch will require lots of scrolling. This is a neat solution and makes life easier. Thanks.
Totally agree Berny!
I was looking for a video on how multiple sketches would work with each other inside a single folder and this really help
Great - glad it helped Jeremiah!
I like it! This will make long sketches more manageable and easier to debug. I have an old non-Arduino program that I will rewrite as a sketch - it's 400 lines long. I'll use tabs.
Very cool Keith! I feel like I rediscover this feature every so often and then get excited to use it again :)
@@programmingelectronics Hey I was wondering if you could tell if I can use Pre Processors to eliminate inter-dependencies of files which have classes in it. I would really appreciate if you can tell me something about it.
Thank you so much for making these videos, it has really helped a lot.
Great and clear video! For my tabs I normally prefix them with 01, 02, 03 so I can sort them with the flow that I want instead of alphabetically.
Great tip Jon - Thanks for sharing!
Test_WemosD1mini:501:6: error: expected unqualified-id before numeric constant
501 | void 3countSTARTUP();
1 or 01 prefix trigger an error, good tips but it doesn't seem to work on IDE1.8.19....! Must use letter prefix like: void A_myfunction();
@Tango charlie I _think_ the issue you are having is that you cannot start function names with a number. Otherwise you'll be fine.
@@programmingelectronics Hey, I am wondering why is that we cannot use numbers in functions /names? Because I guess today compilers are advanced enough to differentiate between functions and stuff right?
@@yashaswikulshreshtha1588 That is a great question! I am not sure of the answer.
Very clear, thank you for your efforts.
When you named the first tab, I thought that you said "Your mama", I got seriously shocked for a moment 😂😂😂
Thanks a lot for this! I have been coding Arduino for a while, and I didn't know about this! I guess this is what they call modular programming. It helps a lot to break things up in smaller, digestible pieces.
Great info. I am a Subscriber now. I will label my tabs A=green b=red c=blue Thanks 👍
Thanks so much for watching! I’m glad it helped!
This is so easy to understand.
I can program Visual Basic but I'm a newbie to Arduino, and this allows me to modularise my code like VB.
Great! Glad it was helpful!
There was a question about if you could set up tabs, so that the functions could be used in other programs - and update in all the programs when the tab was updated - like a library (The comment disappeared when I was attempting to reply - my bad!).
This would be really pretty cool, but unfortunately it wouldn't work. You'd need to have copies of that .ino file in every sketch folder where you wanted to use it , and then every one of the files would need updated if you made changes. In that case, setting it up like a library would be the way to go.
Very good way to organize complex sketch structures! Thanks
Glad it could help!
So excited, I comment first.
I really hunger for this, didn't wrap my head around it first time, hopefully this time I'll due to my trust in your teachings. Because of your awesome teaching I ditched using delays despite it being a difficult habit to leave.
Greetings from Tanzania 🇹🇿
With "Royal Tour" :)
Thanks Raymond!
Cool demonstration. This is a better approach to writing functions for your sketches. It will minimize scrolling to writing code blocks in one file and improve the writing process.
Thanks Bruce! I agree I think it can help quite a bit to reduce a bunch of scrolling up and down a long sketch.
@@programmingelectronics one wastes a lot of time scrolling searching for code. Now just click on the tab.
I know I do!
Excellent content, Keep up the good work!
Thank you!
you are welkom!@@programmingelectronics
I'm new to programming in general, but I have read something about organizing our program. Help, I have questions :
1. since it works in alphabetically order, do we have to adjust the filename according to the program order (following which function come first in the source code) ?
2. what's the difference of calling function from this Tab method, and calling function from library/class (if I make a new file as a library) ?
Thank you very much for your clear and comprehensive tutorial, BTW
EXTREMELY useful. Thank you. Yet to try it, but sure looking forward to making my code easier to read.
Great! Thanks so much!
@@programmingelectronics Unfortunately, Tab is not without its own issues, I am finding. Seems to add another level to debug unless the content of the tab is very simple. As ever, tenacity is required
Very helpful as i am just getting to splitting up larger files and searching the Arduino was not producing applicable results. Your video was clear and consise..
Great to hear! Thanks for watching!
Thank you...! if the function has parameters, what do the tabs look like?
Thanks for this tutorial, is kinda the concept of "MVC/MVVM" Controller structure for organizing code in iOS/Swift ...this is the way for any Object Oriented Programming ;) ...I like so much your teaching skills and I hope you would be the one starting teaching Swift and Arduino with the SwiftIO board architecture 🙏🏼
Thanks for the note!
Great video reminds me of the JSR instruction in RSLogix (jump to subroutine). Thank you for sharing.
Thanks for watching!
Thank you for pointing out this helpful feature. Does it appear to have an impact on compile times that you can tell?
I have struggled with this for a couple of weeks:
A previously working sketch threw hundreds of errors when split into tabs.
My problem was that I appear to have fallen into the "rare cases" category, and had to manually add the prototypes up near my includes.
Subscribed.
Great you got it figured out!
Excellent! I've wanted to know what this was and how it was done. Older 3D printers that used Marlin firmware used to have all those tabs.
Awesome! Glad it helped it helped Donald!
Thanks for the explanation it's clear and easy to understand and alleviate my problem how to deal with massive code in arduino.
Thanks so much Andrew - I appreciate the note!!
Awesome video! This will make my sketches so much better. Thank you.
Thanks a ton for watching Warren! I’m glad it helped!
Thanks a lot, this helped me a lot so I can finally continue
Great! Best of luck!
Very good instructive video. Clear and useful for the daily practice. Thank you!
Thanks so much for watching - really appreciate the comment! We'll do our best to keep them coming...
OmG
Thanks for posting this, helped me a ton!
Glad it helped! Thanks for the note!
Thanks you it's what i was looking for to simplify my code.🙏
Glad it helped!
Great explanation! Will this also work the same in the web editor?
I believe so Brett. Thanks for watching!
Can we define variables in those tabs ??
Thanks for that video. I have a friends sketch, and was having a hard time reading it. Not now!
Nice! Glad it helped for readability!
Great walkthrough of the process
Thanks for sharing your experiences with all of us :-)
Thanks a ton for the note and for watching!
@@programmingelectronics Any time 🙂
Great stuff for the new(er) people!
Thanks so much! I hope you can find it useful.
You explain so well, thank you!
Thank you for the note! I hope it helped.
Thanks for clearing that up. I was assuming the tabs were all separate...but the compiler kept saying otherwise...LoL. Anyways, thanks again.
Glad it helped Dave!
Cool, that is going to be very useful, for robotics I can place different routines in different tabs
Great- I hope it helps! Thanks for the note!
Very useful! Thanks. I wish that Visual Studio had the same. With VS you can create 'Regions' which does help but this tab thing is better. I make classes in VS but it's less convenient to use than these tabs.
Whats the difference between making a library and this?
When I was looking for a solution like this I came across making a .cpp file and .h to make a library but this seems so much easier
So I was wondering what differences they had and why you would choose one over the other
Fantastic tutorial, thank you!
Thanks for watching!
Your videos is amazing sir .👍👍👍Please make more videos on this topic with complex examples and operations.
Thanks so much!
Can we define variables also in separeted tab? Along with related functions?
I liked this video. Question: At the top you use - CRGB leds [nums_led] - Can you tell me what the CRGB is? Thanks
Great question! CRGB is an object in the FastLED library - it lets you control paraments of an an RGB led, so we are making an array of those objects so we can control the colors of the entire LED strip.
He are some docs on it.
github.com/FastLED/FastLED/wiki/Pixel-reference#crgb
Easy to follow. Great video
Thanks Hassan!
This is the best video of subject
Glad you liked it!
so good so far, you did for me, thank alot
Glad it helped!
Very clear and helpful explanation of how to make a big sketch more manageable. Can you do one on how to then migrate those multi-tab sketches from Arduino IDE to Platform IO?
Thanks for the recommendation Steve! I'll see what I can come up with!
Excellently presented content!
Thanks Scott!
The tabs were kind of a mystery, having come from a mostly Visual Studio background. My first experience with the Arduino IDE was 3d printing related, working with the .h files for configuring Marlin code. Nice to understand they are like pages essentially. I'm starting to use them now. Thanks.
great Explanation
Thank you!
works great. thanks for your tutorials
Glad it helped!
I have been hoping someone would explain the tabs Thank you so much!! would you mind also touching on local and global variables in the tabs with public and private, I am trying to understand this part of the tabs Thank you again for all your help !!
Great! Glad it helped Paul! I’ll see what we can come up with to address that question!
Can your functions all go after Loop instead of before setup?
Great question! Yes they can. We did a previous video on organizing code that talks about adding function prototypes prior to setup if you go that route which a lot of folks prefer.
Hello sir, I have a code for ws2812b led which has 12 effects change by push button. But when i off and on it again it's start from frist effect. I I want that when I turn it on it should be on the same last effect on which it was turned off. Please help me 🙏🙏
ooh I see now. Mahalo!
I wanna use line numbers and Goto's!! I wish there was a Basic IDE for Arduinos. My brain hates curly brackets.
Thank you. Useful stuff.
Glad it helped! Thanks so much for watching!
What is the benefit of instead having .h and .cpp files?
I’ve wondered that myself. I’m thinking it’s easier than having to write out include guards, plus, you can’t open .h files in the IDE.
@@programmingelectronics for me it works to create a .h file with "new tab" 🤔
@@agamersdiary1622 You're Right!!!🤩Thanks! For seem reason I seem to recall NOT being able to do that.
Creative video, thanks for sharing :)
Thanks a ton for watching! So much appreciated!
This explains what I really wanted to know. Why do other UA-cams make it so complicated? Thanks
Thanks for watching! Glad it helped!
Is there a precedent for putting a library in a tab? I seem to recall seeing someone referring back and forth to a library to ensure they had the correct spelling or syntax. Using a tab made that very quick and easy?
Great question Jeff! To be perfectly honest I am not sure if there is a precedent/convention on that or not, but I could see it being handy for sure.
Side note, I believe in order to open a .h or .cpp file in the Arduino IDE, those files would need to be in the sketch folder associated with sketch, and not in the libraries folder where libraries typically reside.
@@programmingelectronics Including the version of the library you used directly in your sketch folder would probably avoid conflicts resulting from later changes or upgrades to the libraries maintained in your Documents folder.
@@jeffschroeder4805 I had exactly the same question Jeff. But I wouldn't want to have to place a copy of a library (.h or .cpp) in the sketch folder using it - just a link would be preferable (unless you really wanted to include a local copy of a version of that library for some reason). An even better way would simply be to tell the IDE in some way to just display the library code (.cpp and/or .h) as a tab within that sketch (but not to concatenate the source code to it). What I currently do if I want to readily refer to an included library while writing a sketch that uses it is to open the library source file in a Notepad++ window.
Great insight!!!! Thanx a lot.
LOVE it!!
Thanks Josh! I really appreciate it :)
Good tip!
Thanks!
Thank you.
Thanks for watching!
Awesome. Thanks!
How to decide board reading.ino file esp8266 or esp8266-01,in my case Generics esp8266 board error
Great video
Thanks!
I hope you can make a tutorial also about creating cpp and header file inside one file thanks
Great idea - Thanks for the recommendation!
@@programmingelectronics I second this suggestion!
Thanks @@jon_raymond Taking note!
Thank you!
Well, my 3.3k lines of code now is 16 tabs this is fantastic , how to deal with long large arrays ? Do you make an .h tab ?
Ok I think I got it , now I have 23 tabs 😅
You might need tabs for your tabs :)
I don’t think you can add .h tabs (though I could be wrong). I believe you’d have to create the header file and save it as a .h in the same sketch folder.
I like it, especially the file name. How do you spell 'Tabatha'. So funny.
Thanks Tan!!
Very nice tutorial..
Thanks for watching
Mmnh 🤔, second comment after watching, this is helpful as in "good to know" but not what I hunger for.
Please create another tutorial on using header files (.h), just like classes
Thanks for the recommendation Raymond!
Thanks ! , it worked.
Great!
gracias !!
Thanks for watching!
Hello could you please help me out with this error
Arduino: 1.8.19 (Mac OS X), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"
exec: "python": executable file not found in $PATH
Error compiling for board ESP32 Dev Module.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Good info
Thanks Ratan!
😮 my momma? Reported!!! ... p.s Love the vids and content!! ❤
It would be really cool if the IDE didn't have to recompile everything when only the contents of one tab changed .
It is a great feature, but the UI for it is horrendous! The option is on the top right under a tiny button, instead of in the main menus?? (I won't even talk about THOSE... what a mess!) Then instead of a pop up dialog, you enter the new name in a field at the BOTTOM of the screen??? Come on, Arduino, hire someone with common sense to FIX your User Inteface.
The 'LIKE' button has gone!
Hi to all. I have problem in coding because I don't have enough knowledge. If any of you is interested , I can explain my problem and send my code that I already have . Thanks
You're welcome to post your code here - or the part that might be giving you an error, or the error message. Best of luck!
your mama🤣🤣🤣🤣
Clicked lol
Thanks!!
Thanks