Open thenetw0rk opened 10 years ago
app.get('/servo/:angle', function(req, res){
console.log('received cmd ', req.params.angle);
if(hardware.servo){
hardware.servo.to(req.params.angle);
}
res.send('led *');
});
localhost:3000/servo/(whatever angle you want)
localhost:3000/servo/45
You could also just do step 2, and use the existing patrick/wave/ url
thanks for coming back, i worked it out using the existing patrick/wave/ url but only sweeping
im going try and put a text box like you suggested
hi
i see in the coding the servo part is there
how to i add it to the index.html so it turns the servo