Enjoy DIY Learning Modules designed for engineers:
- Short, self-paced learning anywhere, anytime
- Technologies, Applications & Trivia
See Current Essentials Offerings
What Do You Want to Learn Next? Share Your Suggestion by Replying below!
Enjoy DIY Learning Modules designed for engineers:
See Current Essentials Offerings
What Do You Want to Learn Next? Share Your Suggestion by Replying below!
nelson64 Hi, the First thing I would do is to scrap the Arduino's pitiful IDE and use Eclipse, I use just plain C with my Arduinos, but I still use the Arduino libraries for the most part. you can do this two ways:
first is to write using Arduino FrameWork ie. setup() and loop() (which leaves a lot to be desired
The second is to write using C (you run into trouble with scoping rules with C++ ).
I normally keep one function on one page of code which is included + its header file.
ie..
count.h
int counter; // thsi could now be a Global but you will have to initialize it before you use it
file count_P.h
MaxCount = 8;
MinCount = 1;
#define UP 1
#define DOWN 0
file counter.c
#include counter_P.h
int counter.c ( int updown ) {
switch (updown) {
case UP: { if( counter = MaxCount ) conter = MinCount;
else counter++;
case DOWN:
~~ Cris
Try to go to the web page: nelson64, you will find tutorials, simple projects with diagrams, codes, and videos of the final results. Maybe start by reproducing some simple project you like and then modify it, add features, etc. In this period, when we spend most of our time locked up at home for the pandemic, a hobby like electronics is what it takes to keep our brains active!
Element14 is an inexhaustible source of interesting and curious projects. Have a good time nelson64
Carlo