3.1.15
closed08/28/2023
No issues for this version
Changelog 3.1.15¶
New features:
Direct GPIO support¶
Introduced control of generic GPIO on various (pi)-platforms to control pins on the 40-pin header directly from javascript.
This is a first effort of direct IO and only 5 input and 3 output pins are accessible and enumerated as A to E for input and A to C for output.
The mapping for Raspberry Pi platforms is:
Inputs:
A -> pin 29
B -> pin 31
C -> pin 33
D -> pin 35
E -> pin 37
Output
A -> pin 19
B -> pin 21
C -> pin 23
To access the pins via javascript use:
//To set output level ("high" and "low" is valid)
Controller.GPIOSetOutputChannel("B","high");
//To read the output or input channels (will return "high" or "low")
print(Controller.GPIOGetInputChannel("B"));
print(Controller.GPIOGetOutputChannel("A"));
To listen on events:
/**
* Invoked when any of the GPIO input channels are changing state
*
* @param {String} channel - The input channel. Eg. "A"
* @param {String} toState - Can be "high" or "low"
*/
function onGPIOInputChange(channel,toState){
print("onGPIOInputChange - Input channel " + channel + " changed to " + toState);
}
KIOSK mode¶
Introduced a way of getting an http session as anonymous when explicit using the name kiosk.html on the first page.
This means that when you create a html page as kiosk.html and give that URL to a user it allows the user to access the page without the need for login with user/password.
This is typicaly practical in kiosk applications for public use.
Note that only 1-page applications is supported in this way so if a link to a secondary page is put in kiosk.html the user will be forwarded to the login page!
Clean up:
- Removing the MIRA and BLE5 implementations completely from the platform.
- Added "Path=/" to cookie response. This is a hack due to lack of support in NanoHTTPD library.