Skip to content

Instantly share code, notes, and snippets.

View gregorykelleher's full-sized avatar

Gregory Kelleher gregorykelleher

View GitHub Profile
@tkojitu
tkojitu / HowToUseStructInArduino.cxx
Created February 19, 2012 01:46
How to use struct in Arduino
struct Control {
int pin;
};
void ctrlPinMode(void* control, int mode) {
Control* ctrl = (Control*)control;
pinMode(ctrl->pin, mode);
}
int ctrlDigitalRead(void* control) {