STEP is an imperative and type-safe programming language for Arduino. It is beginner friendly and targets students in the range of 8 to 16 years. It promotes structured programming, and supports simple single-run terminal programs and continuous Arduino programs.
- Familiarize yourself with the structure of a STEP program
An empty STEP program might look like this:
variables
end variables
setup
end setup
loop
end loop
functions
end functions
There are four main scopes. It is mandatory to provide either setup
or loop
- the rest are optional.
- Understand the scopes
Scope name | Description |
---|---|
variables | Contains global variable declarations 1 |
setup | Contains code that should be run at initialization of program |
loop | Contains code that will run repeatedly until Arduino device is turned off |
functions | Contains function definitions 2 |
- Understand the keywords, statements and control structures
STEP is formally documented in the development journal.
- Hello, world!
setup
Print("Hello, world!")
end setup
To get a local copy up and running, follow these steps.
The project is dependant on the Arduino-CLI.
- Clone the repository
git clone https://github.com/KarmaKamikaze/STEP.git
- Navigate to the root folder and create a new ArduinoCLI directory, then enter it
cd STEP/STEP/ && mkdir ArduinoCLI && cd ArduinoCLI/
- Download the Arduino-CLI for your preferred operating system from this source and place it inside the new folder:
Linux:
wget https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Linux_64bit.tar.gz
Windows:
wget https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_Windows_64bit.zip
macOS:
wget https://downloads.arduino.cc/arduino-cli/arduino-cli_latest_macOS_64bit.tar.gz
- Extract the zipped folder to attain the arduino-cli executable
Linux:
tar –xvzf arduino-cli_latest_Linux_64bit.tar.gz
Windows:
tar –xvzf arduino-cli_latest_Windows_64bit.zip
macOS:
tar –xvzf arduino-cli_latest_macOS_64bit.tar.gz
- Install the arduino avr-gcc compiler
./arduino-cli.exe core install arduino:avr
- ??? Profit
- Familiarize yourself with the compiler arguments
Argument | Description |
---|---|
Prints the source code in the terminal | |
-upload [port] | Uploads the compiled code to the arduino device 3 |
-output [port] | Displays arduino serial output in terminal 3 4 |
-ports | Displays what devices are connected to which ports |
- Run the compiler
Linux & macOS:
./STEP [sourcefile] [args]
Windows:
./STEP.exe [sourcefile] [args]
Distributed under the MIT License. See LICENSE
for more information.
Project Link: https://github.com/KarmaKamikaze/STEP
Footnotes
-
A global variable is accessible from anywhere in the program ↩
-
A procedure that can be executed from anywhere in the program ↩
-
If no port is supplied, the compiler attempts to guess the correct port ↩ ↩2
-
The output argument can be used seperately to display the output of an already uploaded program on the arduino. It can also be specified in combination with the upload argument to enter monitor mode immediately after porting the program to the arduino. ↩