Close

Setting up the Environment

A project log for Over Engineered Jack-In-The-Box

What if a Jack-in-the-box was an IoT smart device? This project is an example of how to use Pico device shadows to solve IoT problems.

adam-burdettadam burdett 06/28/2017 at 23:040 Comments

Overview

This entry covers what software and configurations I used to set up the Raspberry Pi environment which includes Pico Engine and midi synthesis along with others.

Raspbian Jessie

The Over Engineered Jack-In-The-Box Pico Engine is hosted on a Raspberry Pi 3 running Raspbian Jessie. Jessie can be found here, along with instructions on installing.

Node.Js

Once Jessie is up and running the next step for installing Pico Engine is updating node to version 4 or greater.

Pico Enigne

While Pico Engine can be installed globally by npm, I installed it locally since I will be changing the source code of the engine. To do this I cloned Pico Engine GitHub project. Pico Engine is a node.js project, so all packages are managed with npm . To install Pico Engine you just call npm install when in the projects directory. This will fail on the Raspberry Pi. Pico Engine uses level down database. Level down has pre-built version for different processors. The last pre-built version that worked for me was 1.5.0. I ran

npm install leveldown@1.5.0
then I was able to run npm install. npm start will start the engine.

FluidSynth

- configure speaker


Midi melodies

HotSpot

Once the Raspberry Pi is running in side the Jesters box how will I control it?
The answer to this question is, "turn the Jack-in-the-box into a hotspot". I was able to do this by following this guide provided by Adafruit. Now the Raspberry Pi is running as a hotspot. I can connect to it, hit the routers/Raspberry Pi ip address fallowed by the port number used by the Pico Engine, in my case, 192.168.42.1:8080/.

Discussions