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
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