Skip to content

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.

License

Notifications You must be signed in to change notification settings

KarmaKamikaze/STEP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STEP (Step Towards Effective Programming)

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.

Writing your first program

  1. 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.

  1. 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
  1. Understand the keywords, statements and control structures

STEP is formally documented in the development journal.

  1. Hello, world!
setup
    Print("Hello, world!")
end setup

Getting started

To get a local copy up and running, follow these steps.

Dependencies

The project is dependant on the Arduino-CLI.

Installation

  1. Clone the repository
git clone https://github.com/KarmaKamikaze/STEP.git
  1. Navigate to the root folder and create a new ArduinoCLI directory, then enter it
cd STEP/STEP/ && mkdir ArduinoCLI && cd ArduinoCLI/
  1. 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
  1. 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
  1. Install the arduino avr-gcc compiler
./arduino-cli.exe core install arduino:avr
  1. ??? Profit

Using the compiler

  1. Familiarize yourself with the compiler arguments
Argument Description
-print 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
  1. Run the compiler

Linux & macOS:

./STEP [sourcefile] [args]

Windows:

./STEP.exe [sourcefile] [args]

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Project Link: https://github.com/KarmaKamikaze/STEP

Footnotes

  1. A global variable is accessible from anywhere in the program

  2. A procedure that can be executed from anywhere in the program

  3. If no port is supplied, the compiler attempts to guess the correct port 2

  4. 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.

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 6