Code Monkey home page Code Monkey logo

Comments (29)

ni-c avatar ni-c commented on September 25, 2024

Hey rubertbuesst,

You can find a guide here: http://arduino.cc/en/Guide/Environment#uploading

Can you post the errors that you receive when you try to upload the duino code?

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Hi ni-c,

Here are the errors when I upload du.ino:

sketch_oct04a.ino:2:22: error: RCSwitch.h: No such file or directory
sketch_oct04a.ino: In function 'void handleRCTriState(char_, char_)':
sketch_oct04a:261: error: 'RCSwitch' was not declared in this scope
sketch_oct04a:261: error: expected `;' before 'rc'
sketch_oct04a:262: error: 'rc' was not declared in this scope

Thanks!

Also, heimcontrol is an awesome project - congratulations!

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Ok, I think I've worked out how to do it. I wasn't importing the relative files as libraries.

I have a quick question though: Can you turn a non RGB LED on and off through heimcontrol?
How do I do this?

Kind regards!

from heimcontrol.js.

ConnorRoberts avatar ConnorRoberts commented on September 25, 2024

Non-RGB LEDs can be controlled through the standard Arduino control plugin as shown here
http://ni-c.github.io/heimcontrol.js/plugins/arduino.html

and just connect it to the Arduino as shown http://arduino.cc/en/uploads/Tutorial/ExampleCircuit_bb.png

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Hi Connor,

Which heimcontrol setting do I use please?
Do I do it under the Arduino settings, if so which method?

Many Thanks!

from heimcontrol.js.

ConnorRoberts avatar ConnorRoberts commented on September 25, 2024

That's a fair point actually! I seem to remember having it working, i'll have play when I'm home.

I'd try the rc-switch mode with the positive connected to whatever pin and ground to arduino ground and then just leave the Tristate blank or fill it with anything, that seems like it may work.

Will have a proper play later and will probably send a pull request with a proper setting anyway, shouldn't be much work and will remove confusion :)

from heimcontrol.js.

ConnorRoberts avatar ConnorRoberts commented on September 25, 2024

Have added an LED option in pull request #18 :)

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Hi Connor,

Thanks for adding the option!

Now just wondering how I update heimcontrol so I can take advantage of the changes you made.
Do I have to format the pi SD card and start again?

Kind regards,

Rupert

On 13/10/2013, at 6:23 AM, Connor Roberts [email protected] wrote:

Have added an LED option in pull request #18 :)


Reply to this email directly or view it on GitHub.

from heimcontrol.js.

ConnorRoberts avatar ConnorRoberts commented on September 25, 2024

Delete the heimcontrol folder, then run

git clone https://github.com/ConnorRoberts/heimcontrol.js.git

and then restart it like you normally would :)

or just

git pull

in the directory (but this will only work when the pull request is merged)

(All data will be safe as it stays in the database)

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Thanks Connor,

I was able to use the git pull method which is awesome.

I'll test out the new feature today. Thanks again for your help!

On 13/10/2013, at 9:41 AM, Connor Roberts [email protected] wrote:

Delete the heimcontrol folder, then run

git clone https://github.com/ConnorRoberts/heimcontrol.js.git
and then restart it like you normally would :)

or just

git pull
in the directory (but this will only work when the pull request is merged)

(All data will be safe as it stays in the database)


Reply to this email directly or view it on GitHub.

from heimcontrol.js.

ConnorRoberts avatar ConnorRoberts commented on September 25, 2024

That may have brought you up to date but it won't include my changes, they haven't been merged yet.

To get my changes, clone my version of the repo for now or wait until the changes are merged :)

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Hi Connor,

In heimcontrol it now actually lets me add an LED, but when I hook it up to my arduino and breadboard it doesn't work.
Does there need to be a change to the duino plugin for the addition of the LED feature?

Thanks :)

On 13/10/2013, at 11:09 AM, Connor Roberts [email protected] wrote:

That may have brought you up to date but it won't include my changes, they haven't been merged yet.

To get my changes, clone my version of the repo for now or wait until the changes are merged :)


Reply to this email directly or view it on GitHub.

from heimcontrol.js.

ConnorRoberts avatar ConnorRoberts commented on September 25, 2024

Just tested on my Arduino (just used duinos debug mode to test before) and it works great, when you wired it up did you include a resistor like in the diagram I posted above? If you did, that'll be why - apparently it's not needed :)

No duino code needs to be changed :)

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Have tried everything, still not working (I'm not using a resistor either).

When I click the LED ON in the heimcontrol interface, and look at my terminal ssh, everything seems to be working, heimcontrol writes to the pin 13 on the arduino where I have breadboard connected with a few leds on it.

For some reason, the arduino isn't taking the commands. Maybe I'll try reloading the duino code to the arduino.

from heimcontrol.js.

ConnorRoberts avatar ConnorRoberts commented on September 25, 2024

Yeah, I'd try reloading du.ino :)

Also, run

ls /dev | grep usb

On the Pi and then if that returns nothing then run

ls /dev | grep -E 'usb|ttyACM*'

And let me know which works :)

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Hi Connor,

Thanks for the reply, the first command didn't return anything, but the second command returned:
ttyACM0

Thanks,

Rupert
On 19/10/2013, at 10:37 PM, Connor Roberts [email protected] wrote:

ls /dev | grep -E 'usb|ttyACM*'

from heimcontrol.js.

ConnorRoberts avatar ConnorRoberts commented on September 25, 2024

Okay go into /node_modules/duino and open up board.js

Look for the line

child.exec('ls /dev | grep usb', function(err, stdout, stderr){

and replace it with

child.exec("ls /dev | grep -E 'usb|ttyACM*'", function(err, stdout, stderr){

that should fix it (Source: http://jvrbaena.github.io/blog/2013/07/15/node-dot-js-arduino-raspberry-pi-ii/)

Let me know how you get on :)

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Thanks Connor,

I'll try that. Sorry again for the nooby question, but which command should I use to edit the board.js file?
I tried: pico board.js (but I think this is wrong it didn't open properly).

Thanks so much, I'm really grateful for your help :)

Rupert

On 20/10/2013, at 9:37 AM, Connor Roberts [email protected] wrote:

Okay go into /node_modules/duino and open up board.js

Look for the line

child.exec('ls /dev | grep usb', function(err, stdout, stderr){
and replace it with

child.exec("ls /dev | grep -E 'usb|ttyACM*'", function(err, stdout, stderr){
that should fix it (Source: http://jvrbaena.github.io/blog/2013/07/15/node-dot-js-arduino-raspberry-pi-ii/)

Let me know how you get on :)


Reply to this email directly or view it on GitHub.

from heimcontrol.js.

ConnorRoberts avatar ConnorRoberts commented on September 25, 2024

Would probably easier to run

rm board.js

and then

wget https://raw.github.com/JvrBaena/duino/master/lib/board.js

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Hi Connor,

It works :) Thanks so much for your help!!

Led is now working for me, can't wait for my rf transmitter to arrive, so I can start playing round with my rc adapters.
I'll also do some work with some applescript so hopefully I can make some sort of make do voice control with apple speech, or dragon dictate as I have an old apple laptop with a broken screen which would be perfect for this.

Thanks again!
On 20/10/2013, at 11:15 AM, Connor Roberts [email protected] wrote:

Would probably easier to run

rm board.js
and then

wget https://raw.github.com/JvrBaena/duino/master/lib/board.js

Reply to this email directly or view it on GitHub.

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

oh s*** my sd card just corrupted on the pi!

Have to start again :( at least I know what to do know!

from heimcontrol.js.

ConnorRoberts avatar ConnorRoberts commented on September 25, 2024

Just as you got it working! ;)

@ni-c Just noticed heimcontrol.js already runs from a forked version of duino (with another variation of the "ls /dev" bit of board.js), just wanted to point out that this isn't working for everyone and

ls /dev | grep -E 'usb|ttyACM*'

worked in this case, I'd have sent a pull request if that line hadn't already been changed by you, which was obviously to fix something in the first place!

I'd suggest something along the lines of

ls /dev | grep 'ACM|ttyACM*'

but I couldn't say for certain that wouldn't break anything else, so would you take a look please?

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Hi Connor,

Just one more question. How do I start the MongoDB? (say if the pi restarts - I get the MongoDB error when I run heimcontrol)

Thanks,

Rupert
On 21/10/2013, at 8:38 AM, Connor Roberts [email protected] wrote:

Just as you got it working! ;)

@ni-c Just noticed heimcontrol.js already runs from a forked version of duino (with another variation of the "ls /dev" bit of board.js), just wanted to point out that this isn't working for everyone and

child.exec("ls /dev | grep -E 'usb|ttyACM*'", function(err, stdout, stderr){
worked in this case, I'd have sent a pull request if that line hadn't already been changed by you, which was obviously to fix something in the first place!

I'd suggest something along the lines of

ls /dev | grep ACM|ttyACM*
but I couldn't say for certain that wouldn't break anything else, so would you take a look please?


Reply to this email directly or view it on GitHub.

from heimcontrol.js.

bkiss avatar bkiss commented on September 25, 2024

Hi rupertbuesst,

you will find the documentation here:

http://stackoverflow.com/questions/17901627/setting-up-mongodb-raspberry-pi

Please notice that, i have changed this script to start the mongodb with journalling, somewhere i put:

--journal

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

Is there a quick command to just start the database?

Thanks :)
On 21/10/2013, at 7:28 PM, bkiss [email protected] wrote:

Hi rupertbuesst,

you will find the documentation here:

http://stackoverflow.com/questions/17901627/setting-up-mongodb-raspberry-pi

Please notice that, i have changed this script to start the mongodb with journalling, somewhere i put:

--journal


Reply to this email directly or view it on GitHub.

from heimcontrol.js.

bkiss avatar bkiss commented on September 25, 2024

I'm using the sudo service mongodb start command, but you need to register as service, simplest way:

cd /etc/init.d
sudo wget -O mongodb https://gist.github.com/ni-c/fd4df404bda6e87fb718/raw/36d45897cd943fbd6d071c096eb4b71b37d0fcbb/mongodb.sh
sudo chmod +x mongodb
sudo update-rc.d mongodb defaults
sudo service mongodb start

--- from the get started documentation...

from heimcontrol.js.

rupertbuesst avatar rupertbuesst commented on September 25, 2024

The problem is, when I turn pi off, then on again - nothing works! The database won't start neither will heimcontrol (cos the database won't start).

Any advice?

:)

from heimcontrol.js.

izim avatar izim commented on September 25, 2024

Do you halt or shutdown the raspi or du you cut the power?
If you don't properly shut down the raspi you have to delete /var/lib/mongodb/mongod.lock and then start the mongodb daemon

from heimcontrol.js.

bkiss avatar bkiss commented on September 25, 2024

I have solved this, starting the mongo database with journalling enabled.

Edit the startup script from init.d (?) and specifify --journal maybe.

http://docs.mongodb.org/manual/tutorial/manage-journaling/

after this, you don't need to delete every time the lock file.

from heimcontrol.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.