This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
The RGB.js sample run fails #92
Comments
As this is using promises, maybe the code should be restructured instead to not require |
You can always do stuff like (not sure now we are not using real promises)
|
Btw, ES2017 would make this quite similar as before promises
Not sure if we could use |
It might make sense, so make an example to see if we babel can be used for transpiling newer ES features onto JerryScript. Example
becomes
Using
and |
Ken's suggestions are still interesting to try out, but the original RGB.js now works again because I've added back a synchronous version of gpio.open. |
Verified. this issue doesn't exist. close this issue |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The RGB.js sample doesn't match the new promise-based gpio API.
We change the code:
var red = gpio.open({pin: pins.IO2, direction: 'out'});
to
var red = null;
gipo.open({pin: pins.IO2, direction: 'out'}).then(function(pin){
red = pin;
});
And the same change of the red, green and blue
Then move the setInterval() to the blue gpio.open statements. Then the test pass.
The text was updated successfully, but these errors were encountered: