Arduino light blinking not working after stopping node.js program - node.js

i am new in arduino, but i do have knowledge of Node.js.
recently i brought arduino uno board. i have tried basic/hello world program of arduino which is LED light blinking, for that i am using jhonny-five.js.
i have plugged arduino board to my laptop, then i uploaded firmata to board and then i run node.js program on my laptop it is working fine, LED light is blinking. every thing is working like charm.
but when i stops the node.js program then LED light stop blinking. basically i want to do that when i just power-up the board, it should run LED blinking functionality.
right now i need to plugin device, then run that node.js program. this way it is working.but is there any way where i just plug arduino board and it automatically runs LED blinking functionality without running node.js code on my pc.

The Firmata library is exactly for receiving commands over Serial port. So you can run code on your computer and commands that must be executed in Arduino are sent there. But without that program, it's just waiting for commands, so it does "nothing".
If you wan't stand-alone program, you have to use Arduino IDE and upload code directly.

Related

Raspberry: serial port not working after boot, application should be restarted

I wrote a QT application on Raspberry and I implemented a serial communication between Arduino and raspberry. The serial communication is working well, but I'm facing an issue after boot.
When I launch the application the first time, the serial communication is not working, even if I wait time.. I should end and restart the application, then it will work perfectly.
This is the code, I'm not doing something special, consider that after then I start to read/write through serial.
Should I do something before start the communication?
Why it could not work fine?

How to run Node.js on esp8266 (Nodemcu dev board)?

I am trying to connect Apple homekit to nodemcu board, I found a tutorial which works on my computer, but I am wonder if there is any way to load and run Node.JS on a NodeMCU board (ESP8266)?
You can run Espruino on it. I have the HiLetgo NodeMCU ESP-12E Module and was easily able to load the firmware.
Download and install flasher https://github.com/thingsSDK/flasher.js
Press and hold the flash button press the reset button once. It will flash once.
Open up flasher app and flash the firmware for Espruino.
Unplug the esp8266 and plug it back in
download the web ide for Espruino https://chrome.google.com/webstore/detail/espruino-web-ide/bleoifhkdalbjfbobjackfdifdneehpo?hl=en
Change the baud rate Settings --> Communications --> Baud Rate 115200
Connect and enjoy!
Some samples to try out
https://github.com/mertenats/NodeMCU-and-JavaScript
I think you're confusing nodemcu, which is a firmware for the ESP8266 boards that interprets the language lua, with the javascript runtime node.js, which runs on computers.
So, the answer is you cannot run node.js on an ESP8266.

cylon.js & arduino uno: execute program without cable connection to PC

I am new to this field, so this might be an odd question.
We can write a code(say blinking lights) in the aduino IDE and upload it to arduino and we can disconnect from the pc and the program will run. (blinking will happen).
Now when we are using cylon.js and write the program and execute say
$ node blinking.js
then as long as the arduino is connected to the pc(or laptop) the blinking happens and when I kill node js or disconnect arduino from pc the blinking stops. (this is how its suppose to happen, right?)
So my question is,
if I have a arduino with a temperature sensor some where outdoor and I have a cylon.js program to use those sensor data and do some things (say print them), then how can I achieve this ? Do I have to have two arduinos which are connected via wireless or gsm shields (one outdor and one connected to the pc where the cylon.js is running)?
or is there a simple way of doing this? Any insight on this is much appreciated.
Thank you
then as long as the arduino is connected to the pc(or laptop) the
blinking happens and when I kill node js or disconnect arduino from pc
the blinking stops. (this is how its suppose to happen, right?)
Correct. This is true for any Node.js program controlling an Arduino, whether with Cylon.js or Johnny-Five.
if I have a arduino with a temperature sensor some where outdoor and
I have a cylon.js program to use those sensor data and do some things
(say print them), then how can I achieve this ?
It's not possible with just an Arduino board. You can use a pair of Xbee modules, which will allow your Arduino to communicate with the host machine, or just use a board that has wifi or bluetooth capabilities, such as:
Spark Core
Electric Imp
Intel Galileo
Intel Edison
Raspberry Pi
BeagleBone
pcDuino

Arduino webserver using GPRS

I am trying to make Arduino web server using SIM300. I want to control my Arduino through the web from any where around the world. Controlling through SMS is easy, but it does not guarantee that an SMS will reach it on time. How can I do that?
I'd start by reading this. http://arduino.cc/en/Guide/ArduinoGSMShield
On the other hand I can advise you that running a webserver on an Arduino is kinda high end for a low end board. (although not impossible of course)
One would more easily use a Raspb Pi or a beagle bone for this.
If you would implement a webserver on your arduino it runs that server sequentially next to the code you want it to execute. (so when it is by example steering a servo the webserver will not work)

Arduino HC-05 Bluetooth after several connections it crashes

So I use a Arduino Nano and a HC-05 Bluetooth module.
The problem is that after several connections made one after another the module stops connecting to the device.
The android application is not the problem because I try to connect with other applications and same problem.
I did try to add a watch dog on the arduino nano but seem that it does not crash in the loop .
Got any suggestions what I could do ?
Edit: So I've seen if I use watchdog with the original bootloader doesn't work , got other solutions how to reset or why my Bluetooth module does not allow connections after it crashes?

Resources