: Aka Morten Skoglys nerdcave

ReMorten v0.1 – Part 1

august 23rd, 2017 by

The ReMorten Project: A telepresence robot platform using nodejs running on the Raspberry Pi. Because why not.

Part 1: Snapping pictures using the Raspberry Pi, and exposing them outside your local network. A minimalist Peeping Tom system. It will also let me spy on my cat.

(Prerequsites: You’ve already got the Pi and the pi camera module up and running with Nodejs and npm installed. I use VNC viewer to connect to the Pi). You can purchase the camera module via eBay. This is the cheapest rpi2 I could find on eBay today

Make and enter a dir for your project and install node-raspistill:

npm install node-raspistill

make a file called interval.js and add this (taken straight from the node-raspistill example folder on Github):

const Raspistill = require('node-raspistill').Raspistill;
const raspistill = new Raspistill();
setInterval(function() {
        .then((photo) => {
            console.log('took photo', photo);
        .catch((error) => {
            console.error('something bad happened', error);
}, 15000);

Run it by typing

node interval.js

Node-raspistill will create a subdirectory called photos, and start taking and adding pictures. Visit that dir to confirm that the pictures are showing up.

The easist way to serve the content of that directory as a webpage using http-server

sudo npm install -g http-server

Enter the photos directory and type:


You should see something like

Starting up http-server, serving ./
Available on:

Now to the fun part.
To see the content of that folder from a machine outside your firewall/local network:

Go to and download the Linux Arm version of ngrok. Unpack the zip and type this in the terminal:

./ngrok http 8080

In the output from ngrok, find the Forwarding line, it looks something like this:


where the 1234567 part will be unique every time you run ngrok (unless you make an account and pay them to get a permanent subdomain, which you should).

Visit that url on a remote machine outside your network to verify that it works. Refresh the page to see a list of newly added files.


This is of course an insecure method that would leave your Pi and your network vulnerable, but it works well enough for testing purposes. Also: Leaving interval.js running willfill up your Pi until it dies, I suppose.

Next: Storing the images on Google Photo or another service with unlimited storage, and delete older images from the Pi to prevent it running full.

Posted in Code, Projects

Drawing machine #2

august 10th, 2016 by

This drawing machine is built with cardboard, hotglue and small inexpensive 9g servos from Ebay, and is programmed with an arduino.

First test

Hvorfor lage bare en tegnemaskin når man kan lage to :)

A post shared by Morten Skogly (@mskogly) on

Second test

#drawbot #arduino #art

A post shared by Morten Skogly (@mskogly) on

The above video shows the Drawing machine #2 running a plotclock script, but because the servomotors are placed in a different configuration than intended the result is quite interesting.

The code is available from

Posted in Artwork, Projects

Drawing machine #1

august 4th, 2016 by

This has been on the todolist for a few years, but today I finally got around to building my first drawbot using Arduino. I wanted to make something that was light, minimal and portable, that can be added to any flat surface with a gluegun. I use small steppermotors with bobbins (from eBay) and thread from a sewing machine to lift a coin with a sharpened charcoal-stick though the center, and a solid metal picture frame as a base.

Version 0.1: Drawing spirals

Hvorfor tegne selv når man kan lage en maskin til å gjøre jobben :)

A post shared by Morten Skogly (@mskogly) on

Arduino: Duemilanove arduino board or similar, from eBay.
2 x Stepper motors: 28BYJ48, from eBay
2 x stepper drivers: ULN2003, from eBay
Gondola: Coin with center hole. Charcoal is sharpened and fitted, and fastened with a few dots of glue.
2 x Sewing machine bobbins, from eBay with thread
Charcoal stick, from eBay
Hot glue gun, from eBay

Code (based on this):
By changing the speed and number of steps it draws asymetric paths. 2048 steps = 1 revolution on these stepper motors.

Charcoal Timelapse:

Pen plotter #1 timelapsei 12x hastighet. #hyperlapse #drawbot #arduino

A post shared by Morten Skogly (@mskogly) on

Ink Test
I cut a piece of sponge and used a pipette to add ink while the machine is running.

Arduino + steppermotorer + svamp = kunst! #arduino #drawbot #art #diy

A post shared by Morten Skogly (@mskogly) on

Version 1.0: Running Polargraph Controller software

The machine is now running the Polargraph firmware, controlled via serial from a Processing app on my laptop. It took a bit of tinkering to get the firmware to run with my steppers and drivers, but once it was up and running it worked pretty well.

Drawing machine #1 is taking shape!

A post shared by Morten Skogly (@mskogly) on

#wip #drawbot #polargraph #art

A post shared by Morten Skogly (@mskogly) on

Next steps
Run the machine on grbl firmware and test other controllers.
Testing a variations of pens and paper.
Build more machines! Some of the motives I’m working on takes up to 12 hours to draw, so to increase the learning curve I would love to have at least a few more up and running.

Useful tutorials:
Wire and run one stepper and driver.
BYJ48 stepper motor on Instructables
Code for running two stepper motors in opposite directions
Polargraph Drawing Machine on Instructables




Cardboard project box, spot glued to the back of the frame for easy removal.  

Test, running unicode.h library

Write L, R, U or D in the Serial Monitor to control the motor. (see also: Youtube Tutorial)


Serial Monitor

Posted in DIY, Featured, Projects