1 unstable release
0.1.0 | Feb 18, 2023 |
---|
#1252 in Programming languages
21KB
450 lines
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 registerT[reg][reg]
- swap values between registers![reg]
- print value from register (with a new line)o[reg][val]
- set GPIO pinval
to the register value (0 - low, 1 - high)i[reg][val]
- load value of GPIO pinval
into registerp[reg][val]
- set PWM on GPIO pinval
to register value (-1.0 - 1.0)s[reg][val]
- set the servo position on GPIO pinval
to register value (-1.0 - 1.0)P[val]
- set P in PID toval
I[val]
- set I in PID toval
D[val]
- set D in PID toval
q[val]
- change the PID setpoint toval
c[val]
- calculate the PID usingval
as the measured value
License
Angelio is licensed under the MIT License. See the LICENSE file for more information.
Dependencies
~365KB