4

I'm port forwarding on my Raspberry Pi by adding these lines right before the exit line in /etc/rc.local: # Forward port 80 to 5000 (where our web server is) so the # web server can run at normal permissions iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 5000 This allows me to request on port 80, but have the web server running at ...


2

Yes you can talk to some sensors entirely JavaScript, e.g. npm install raspi-sensors npm install node-dht-sensor That first library was last updated three years ago, so as is typical with the Pi (and Linux) you may deal with some compatibility challenges, while node-dht-sensor was updated two months ago. You can search the npm repository for other modules ...


2

I attached the wires from a single button to my 5v pin and GPIO pin 23 The GPIOs on the Pi are on a regulated 3.3V circuit. This is true whether they are set as outputs or inputs. If you attach them directly to a 5V source, including the pi itself, you may damage them permanently. This doesn't explain why the pin fluctuates with the button up unless it'...


2

Yes. you can use Node-Red with gpio contrib. Its visual programming with javascript. https://www.npmjs.com/package/node-red-contrib-gpio Also, you can try cylonjs. It supports many platforms other than raspberry pi. http://cylonjs.com/documentation/platforms/raspberry-pi/


2

Your GeekDuino is based on ATMega328 which AFAIK doesn't provide any UART flow control. So, if you send too many bytes at once, you will lose some of the bytes and thus risk to get erratic behavior depending on the protocol you have. I know you run the same software on both Mac and RPi, but they certainly have different UART drivers, which may affect how ...


2

If GPIO X has been exported then the directory /sys/class/gpio/gpioX will exist. E.g. if GPIO 4 has been exported $ ls /sys/class/gpio export gpio4 gpiochip0 gpiochip100 unexport If it has been exported the directory will have the following entries. $ ls /sys/class/gpio/gpio4 active_low device direction edge power subsystem uevent value To ...


1

If one googles this phrase "raspberry pi gpio web interface" and switches to images mode, we can see that there appear to be quite a number of pre-existing solutions and samples. For example: http://hackaday.com/2013/02/02/easy-web-interface-with-gpio-access-runs-on-raspberry-pi/ https://www.raspberrypi.org/forums/viewtopic.php?t=15257 http://www....


1

Depending on what tool you are looking at, 20% usage of a quad core processor would be 80% of one core. Loading that ticker example into chrome on a quad core 3.4 GHz x86-64 machine uses 10% (i.e., ~40% of one core) so this is something that is very unlikely to get better on the pi using that code, which I agree performs atrociously (but seemingly ...


1

Unfortunately I was not able to put it to work using the rpio.poll function However, I managed to listen to the input pin by using a setInterval() method: function status(){ rpio.open(15, rpio.INPUT, rpio.PULL_UP); setInterval(function(){ var status = rpio.read(15) console.log(status) },1000) } I did try to listen every second, ...


1

There are many things that can be done to achieve a performance improvement on a Raspberry Pi. You linked an example using the GPU to achieve better processing speeds. Here is another example that you might want to look at, but it is not a simple solution. There are many other ways to optimize code, but I am not familiar enough with JavaScript to make a ...


1

I do just that using Node-RED on my Pi, it has serial nodes as part of the basic install. See Node-RED website


1

Generally speaking, JavaScript scripts are not given direct access to hardware by the browser. This would be an enormous security vulnerability; imagine going on to a website and it can then access everything connected to your computer. Not good. That said, you can still achieve what you want a slightly different way. Your Pi needs to be a web server; you ...


1

You have, unfortunately, hit the nail on the head. The Raspberry Pi does not have analog pins, therefore it is unwise to expect it to be able to read analog values. You would need an analog-to-digital converter (for example the MCP3008) and then you would need to change the cylonjs source to read values from a different bus (SPI or I2C - there are a2d chips ...


1

You didn't make it clear enough about why publish isn't working. But from that screenshot I suspect it is expecting an ftp server to be installed on your Pi. That can be done, but it is here is a workaround that might work for you, using native Pi stuff, plus Apache: Instead of using publish, I would first try transferring the files directly. Save your ...


1

This turned out to be an issue of powering the Geekduino from any of the Raspberry Pi's ports. I swapped out the Geekduino for an Arduino Uno, used the USB A to USB B cable, put the Robot Geek sensor shield on it, and ran my programs. They servos animate fine when the Arduino is powered by the Raspberry Pi now, as well as the Macbook Pro.


Only top voted, non community-wiki answers of a minimum length are eligible