Skip to content

Instantly share code, notes, and snippets.

@vschep
Last active February 28, 2016 17:16
Show Gist options
  • Save vschep/0e0cb3a03f23a7b4adfd to your computer and use it in GitHub Desktop.
Save vschep/0e0cb3a03f23a7b4adfd to your computer and use it in GitHub Desktop.
Snippet regarding reading A/D values for my automobile blog
volatile unsigned char * adValue = (unsigned char *) 0xFFB00000;
void battVoltStatemachine() {
unsigned char battVolt = *adValue;
if (battVolt < 10) {
// change state
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment