Code: Select all
[code]// Modules
var express = require('express');
var app = express();
var piREST = require('pi-arest')(app);
// Set unique ID
piREST.set_id('p5dgwt');
piREST.set_name('pi_cloud');
// Connect to cloud.aREST.io
piREST.connect();
// Start server
var server = app.listen(3000, function() {
console.log('Listening on port %d', server.address().port);
});
When the JS code starts it look like that all the GPIO's are blocked and i get message " channel already in use".
After that i can not access keypad and button.
I added GPIO cleanup function in python keypad and button code and this has solved the problem but this isn't good solution because, relay can be triggered any time and when it does, he will again block the GPIO ports.
Btw. each HW part is on different GPIO pin.
Why do i get such error message when i run JS aREST code how can i "limit" arest to controll just two predefined GPIO pins ( 11 / 12 in my case ) ?
PIN