I all,
i'm newbee in beaglebone black
i try this code
*var http = require('http');var url = require('url');var querystring =
require('querystring');var b = require('bonescript');var pin= 'P8_45';var
server = http.createServer(function(req, res) { var params =
querystring.parse(url.parse(req.url).query); if('nb_out' in params &&
'etat' in params){ b.pinMode(pin, b.OUTPUT); if(params['etat'] ==
'off'){ res.write('<h2>OUT VCC</h2>'); b.digitalWrite(pin,
b.HIGH); } if(params['etat'] == 'on'){
res.write('<h2>OUT 0V</h2>'); b.digitalWrite(pin, b.LOW); }
res.write('<a href="http://192.168.1.37:8811/drive_out?">retour choix
sortie</a>'); } else{ res.write('<a
href="http://192.168.1.37:8811/drive_out?nb_out=1&etat=off">LED
ON</a><br/>'+ '<a
href="http://192.168.1.37:8811/drive_out?nb_out=1&etat=on">LED
OFF</a>'); }; res.end();});server.listen(8888);*
I have this error
*/usr/local/lib/node_modules/bonescript/my.js:57 if(slot[0])
{ ^TypeError: Cannot read property '0' of null at
Object.exports.load_dt
(/usr/local/lib/node_modules/bonescript/my.js:57:20) at
Object.exports.create_dt
(/usr/local/lib/node_modules/bonescript/my.js:123:33) at
Object.exports.setPinMode
(/usr/local/lib/node_modules/bonescript/hw_capemgr.js:83:12) at
Object.f.pinMode
(/usr/local/lib/node_modules/bonescript/index.js:160:15) at
Server.<anonymous> (/var/www/13:10:7) at Server.EventEmitter.emit
(events.js:98:17) at HTTPParser.parser.onIncoming (http.js:2108:12)
at HTTPParser.parserOnHeadersComplete [as onHeadersComplete]
(http.js:121:23) at Socket.socket.ondata (http.js:1966:22) at
TCP.onread (net.js:525:27)*
if I use P8_13 a same with exemple , this code is ok
What i must do for use the p8_45 (gpio2_26)?
thinks for reply :)
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.