Monthly Archives: December 2016

Adding Menu Options to A Sketch

Did you know that you can add UECIDE menu items to your sketch? Not sure what I mean? Ok. Here goes.

Imagine you have one sketch that you want to use in multiple different ways. Maybe you have both “master” and “slave” code within the same sketch and want to select between them. Or maybe you want to be able to set a different communication speed, or a different buffer size, depending on how you are using the sketch at that moment. The traditional way of dealing with that sort of thing is to use #define and #ifdef, etc:

#define BUFSZ 1024

int16_t bufferA[BUFSZ];
int16_t bufferB[BUFSZ]; Continue reading