angelio 0.1.0

Simple esolang with GPIO support
Documentation
  • Coverage
  • 0%
    0 out of 17 items documented0 out of 8 items with examples
  • Size
  • Source code size: 21.59 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 764.72 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • zzanp/angelio
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • zzanp

Angelio

(Esoteric?) programming language with with scripting API, written in rust. It has built-in GPIO support on the Raspberry Pi.

Usage

To call a script from a file, you can use the Angelio::new function:

let mut script = Angelio::new("path/to/file.aio");

Alternatively, you can create a script reading a string directly from a variable:

let mut script = Angelio::from_str("lr121lr237+r1r2+Tr3r1").unwrap();    // or just from_string for String

Then you can run the script:

script.run();

Specification

Angelio has 8 number registers: 4 for integer type [r1-r4] and 4 for floating point type [f1-f4].

Here is a list of commands that the interpreter accepts:

  • l[reg][val] - reads the value into register
  • T[reg][reg] - swap values between registers
  • ![reg] - print value from register (with a new line)
  • o[reg][val] - set GPIO pin val to the register value (0 - low, 1 - high)
  • i[reg][val] - load value of GPIO pin val into register
  • p[reg][val] - set PWM on GPIO pin val to register value (-1.0 - 1.0)
  • s[reg][val] - set the servo position on GPIO pin val to register value (-1.0 - 1.0)
  • P[val] - set P in PID to val
  • I[val] - set I in PID to val
  • D[val] - set D in PID to val
  • q[val] - change the PID setpoint to val
  • c[val] - calculate the PID using val as the measured value

License

Angelio is licensed under the MIT License. See the LICENSE file for more information.