Let's Make Robots!

Picaxe Basic Issues

In Picaxe Basic how do I write a piece of code that I only want to execute the first time my main loop runs. For example: I want to get and store an initial value for a sensor and use that later on in my code; however, once I have stored this initial value I don't want the program storing a new value the next time it runs.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Seems to work, thank you!

Can’t you just do that above the main loop?