Go Down

Topic: quick question: Ways to call functions from mai loop (Read 1 time) previous topic - next topic


I can't find this in the reference section, or I'm just to green to know what to look for. I want to call an object (function from the main loop)
something like:
Code: [Select]
if viewState == 1 {call function mainView()}

mainView is not supposed to return any values, but simply print text and values to the LCD.
should i use a void for this?


Code: [Select]

void mainView(void) {
  // do whatever

void loop(void) {


  if (viewState == 1) {


The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, speaker, microphone, light sensor, potentiometer, pushbuttons

Go Up