Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Nice Porject but getting errors, starting it #1

Open
Steakschen opened this Issue · 9 comments

4 participants

@Steakschen

Here my "startup log"

root@raspberrypi /var/www/raspi-tank # node app.js
info - socket.io started

/var/www/raspi-tank/app.js:41
console.log('Listening %d in %s mode', app.address().port, app.settings.env);
^
TypeError: Cannot read property 'port' of null
at Object. (/var/www/raspi-tank/app.js:41:53)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:901:3

Port is defined like you with 3000, 2 rows before.

How do you control the servos ? with a board oder directly with the gpio?
thanks

@mirceageorgescu

Have you tried using a different port? Maybe 3000 is already in use.

I built a motor driver using L298N circuit. This is the diagram I used:

http://read.pudn.com/downloads182/doc/849113/L298N/L298%E5%BA%94%E7%94%A8%E5%AE%9E%E4%BE%8B.files/L298_motor.gif

@Steakschen

Got it working now Thanks :)

But must learn js now, because i will control it over the Raspberry pi servo board and must execute serial commands :-/

@Steakschen

Hello Mircea Georgescu,

can i fork your great work to make it work with the Servo-Board from
http://electronics.chroma.se/rpisbv3.php

with some Code changes?
Its my first time i do this, so i will ask you if this is ok.
Thanks

@mirceageorgescu

Sorry for the late response. Of course you can fork it and do whatever you want with it. Open source FTW!

@mirceageorgescu

What was the problem with the port? How did you fixed it?

@zimbabwe

Hi,

I want to try this project but I do not know which pins to use.

Examples like this;

Port.1 > GPIO port x ?

and can i use toy car engines ?

@Jamie-

I think the pins to use are: (pin numbers on the Pi, see http://elinux.org/File:GPIOs.png )

Pin #11 = Right Motor
Pin #15 = Left Motor
Pin #12+16 = Reverse

If you plug the toy car engines into a motor driver (I use the L298N motor driver because it is really cheap on eBay) then there is no reason why they shouldn't work. Bear in mind what voltage they were originally used at, and keep that the same!

Hope this helps! :)
Jamie

@mirceageorgescu

You can read more about pin configuration here: https://npmjs.org/package/pi-gpio

@zimbabwe

thanks for answer but i want to ask...

http://read.pudn.com/downloads182/doc/849113/L298N/L298%E5%BA%94%E7%94%A8%E5%AE%9E%E4%BE%8B.files/L298_motor.gif

how can i connect for this schema

Port.1 to GPIO.x like this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.