MiceOnABeam Product Documentation

Modified: 5/7/2013 2:09 PM
Recently changed articles You can subscribe to this wiki article using an RSS feed reader.

Tutorial - Step 8

Previous 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Next



 

  • Next we need to create a State Variable. The top-level state TriColorLight needs a variable named Timeout whose value is the number of seconds to delay between switching colors. To create this variable, right-click on the background of the State Editor and select Edit State Variables and Functions

 

  • Select an unused row in the State Variables section; choose float from the Type drop-down list; enter Timeout as the variable Name, and enter 2.0 as the Initialization code. Note that both the "=" and the final ";" are built-in and do not have to be manually entered. Click the OK button when done.

 

 
  • As a state variable, Timeout will be accessible to all code within the TriColorLight state, which since it is the top-level state, will be accessible by all contained states.

Previous 1 2 3 4 5 6 7 8 9 10 11 12 13 14  Next

Tags:
Home: MiceOnABeam Product Documentation Copyright © 2010-2018 MiceOnABeam Software