Last week I had to develop a quick prototype on a raspberry pi. A nodeJS app that counts pulses from a liquid throughput sensor which forwards the data to a SAP Hana backend.

Using a software mock for my sensor only helped until a certain point. In the end I had to test the actual sensor on the actual device. And that is where I was a little annoyed. I use a ssh shell to connect to my Pis and I use Github to push software to my devices. but constantly performing commits on my developing machine and pulls on the device is „pretty“. So this is what I came up with:

1. install Fuse for OSX + SSHFS with homebrew
2. Mount RPI via Network
1. `sshfs pi@192.168.200.4:/ ~/Desktop/rpi_mount/` in the Mac Terminal
3. Open mounted folder with Intellij
4. connect to Pi with SSH
5. install nodemon and start nodejs application with `nodemon app.js`
6. edit files, watch live reload happen on Pi

MacFuse lets me mount non OS X file systems on my mac. SSHFS lets me mount filesystems via sftp/ssh. Now I can develop in my known IDE and see my application live reloading on the embedded device. Every time I change a file, the nodemon tool reloads the application. I get responses to my development progress within 1-2 seconds. Very handy!

Alle Beiträge von Pascal Brokmeier

Schreibe einen Kommentar