Comments (9)
Been a while, but this should fix it:
board.on('ready', function(){
servo.sweep()
});
from duino.
First of all: really great work :)
Any news on this?
Seems as if the example is still not working.
i tried it with the default port and additionally with a defined port.
my code:
var board = new arduino.Board({
debug: true
});
var led = new arduino.Led({
board: board,
pin: 13
});
var servo = new arduino.Servo({
board: board,
pin: 10
});
board.on('ready', function(){
console.log("onBoardReady");
servo.sweep()
});
And the console log
1348077083718 duino info attempting to find Arduino board
Server has started.
1348077083735 duino info found board at undefined
1348077083735 duino info binding serial events
1348077084237 duino info board ready
1348077084238 duino info sending debug mode toggle on to board
1348077084238 duino write 9900001
board ready, attaching servo { board:
{ debug: true,
writeBuffer: [],
_events: { ready: [Object], data: [Function] },
serial: { _events: [Object], fd: 9, readStream: [Object] } },
pin: '10' }
1348077084240 duino write 981001
onBoardReady
1348077084241 duino write 981003
1348077086243 duino write 981003
1348077086246 duino receive signal: servo
1348077086250 duino receive reading servo
1348077086250 duino receive 10::read::093
1348077086250 duino info moving to: 180
1348077086251 duino write 981002180
1348077086254 duino receive signal: servo
1348077086258 duino receive writing to servo
1348077086258 duino receive 180
1348077088244 duino write 981003
1348077088249 duino receive signal: servo
1348077088249 duino receive reading servo
1348077088253 duino receive 10::read::180
1348077088253 duino info moving to: 180
1348077088253 duino write 981002180
1348077088257 duino receive signal: servo
1348077088261 duino receive writing to servo
1348077088261 duino receive 180
Any ideas?
Even the examples within the repo does not work - it stops with the same issue that hiattp had.
Cheers
Nikolai
from duino.
Looks like this could be your problem?
1348077083735 duino info found board at undefined
It appears it's not finding a board, but the program continues.
If this isn't the problem, I'm not sure. I've been super busy with work lately, and haven't been able to maintain this repo like I had hoped. I'll wire up a servo this weekend and take a deeper look for you guys :)
from duino.
Hey ecto ;)
thx for the quick respond!
it seems as if i've been blind :D
Thanks for your hint - i really appreciate!
Looking forward to your servo tests :)
from duino.
Just to make it clear:
i added a few logs to the board.js to trace the "undefined":
1348149217505 duino usb:: tty.usbmodemfa141 (self.log("usb:: " + possible);)
1348149217505 duino possible: tty.usbmodemfa141 (self.log("possible: " + possible);)
1348149217506 duino possible -> tmp.port: undefined (self.log("possible -> tmp.port: " + temp.port);)
maybe this helps you a bit.
i'm a bit to new to arduino to see where it gets stuck...
thanks in advance :)
Nikolai
from duino.
Hey, couldn't find anything anomalous. Could you post the circuit you're using?
from duino.
Hey ecto :)
thx for your reply, i really appreciate!
i used a circuit like this:
http://arduino.cc/en/uploads/Tutorial/sweep_BB.png
i tried out a few digital ports like 9, 10 or 11.
my arduino is connected to "/dev/tty.usbmodemfa141"
i also tried the johnny-five solution on git (https://github.com/rwldrn/johnny-five/) and this works fine with this circuit.
Cheers
Nikolai
from duino.
I'm getting the same error....
from duino.
Hey peeps,
was anyone able to solve this? I get the exact same "board ready, attaching servo" message.
cheers.
from duino.
Related Issues (20)
- du.ino process() incorrectly parses servo messages
- Event emitter seems to be not working
- Hi, need an especific port HOT 7
- Define is not defined HOT 2
- Duino doesn't work with 2 servos? HOT 1
- Raspberry Pi HOT 3
- events.js:2725: Uncaught Error: Cannot open /dev/usbdev5.1 HOT 3
- Push 0.0.9 to npmjs
- How do I access the examples? HOT 1
- How would I go about adding Arduino libraries HOT 1
- Enable Reed Sensor in Duino
- 'connected' event triggers before the SerialPort is opened
- Use chalk package instead of colors
- conect onewire sensor HOT 2
- Cannot use on Windows: `board.js` hard-coded *nix paths HOT 1
- Error: Serialport not open HOT 1
- ADD support for Rc-Switch : RecivedValue() from board ?
- Readme file has markdown syntax issue HOT 1
- GHSL-2020-118
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duino.