Orange pi

So I finally got the orange pi running.It hasn’t been hard, it just has not been a priority.

I bought one months ago when I saw it on hackaday for 15$. Took a month or so to arrive. Then I realized it has kind of a weird power adapter port (not powered by usb like the raspbery ) so I bought one of those and that took a bit.

I went to a sketchy chinese website and downloaded the image for the “orange pi pc” Lubuntu.

I don’t know why I picked lubuntu now, but seems like a reasonable choice.

Clicked on the image on my ubuntu box and brought up a disk image program that let me install on the orange pi.

Popped the sd card in that bad boy. Booted right up. Can ssh into it with user orangepi, password orangepi.

Updated all the crap.

Installed nodejs and npm using apt-get install and symlinked (sudo ln -s )node to nodejs.

It all seems fine. Pretty Neat.




High Speed DAC Aliexpress

I bought this bad boy. Seems cool. Thought maybe I could brute force my way into AM radio land with it.

Also a good project for fpga. Microcontrollers are going to be too slow.

A noticeable problem is the missing of the pinout

AD:DA pinout

This appears to be the same product and I can at least confirm that this pinout does work for the DA side of things.

I wrote a quick test program to service it with a ramp function with an arduino. Good idea to sanity check before diving into the deeper waters of fpga.


IMG_0143 2Ripping through the arduino code with no delay makes a ramp at 53.2Hz. Pathetic, but working.





Root Beer ONE


Root beer go.

40g Sarsparilla

40g Sassafras (the good shit)

1 vanilla bean split and scraped

1L water

10g birch bark (This is tree)

start boil 4:33

turned off heat 4:53

5:04 it is awful

fill with water up to 1L

220g sugar


Also Is known carcinogen

“I like the initial flavor but then it feels like I have a tree in my mouth. It evens out into stick.” – Judgeful Beth

Maybe we should transition into the ice cream business


We’re trying to detect a green laser and having problems. One problem is that the laser is so goddamn bright that it is saturating the camera. Maybe that be nice except that the ligthbulbs in the background are doing that too.

Some useful little mini programs:

Capture and image and save it.


This let’s us poke around on an image and print out the data corresponding to a point.

The HSV decomposotion from the tutorials is ok, but  not cutting the mustard.

Maybe something more autocorrelationy?

So I get the python side, and I was giving the C side a go.

Apparently the recommended way is to use Cmake to make your projects. I don’t like it.

Kind of fell off the bandwagon on this one. Would be better to actually get something working in python before going onto this.


Raspberry Pi

Scan the network for a ip that shows up

nmap -sn

log in with ssh. You need (hypothetically I’ve heard tale of other ways, but just do this. You have a monitor. So much easier) to boot once with a monitor to set the ssh server on bootup.

ssh pi@

password: raspberry

setting up wifi

Jesus, had to update everything.

sudo crontab -e

Ran into this issue. Needed to update npm.

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

network={ ssid=”WORK” key_mgmt=NONE wep_key0=PASSKEY }

Ran into massive pyserial problems. I don’t get it. Apparently the solution wast o change from the ubuntu repository version to the pip installed versions of pyserial

Bought a cheap aliexpress display. This worked:

Folgertech prusa update

SO, it turns out we’ve been printing mirror images of parts somehow. We just printed raspberry pi cases and they don’t fit. I suppose we had been printing parts that are too symmetrical to observe this before.

What’s extra bizarre is this makes the coordinate system of the printer not right handed. Now the maximum of x is towards the power supply side.

We played with some stuff in the marlin configuration file

Removed the #define disable_max_endstops line

#define INVERT_X_DIR true

#define X_HOME_DIR 1

Seems ok now.

Writing a WordPress sketch Plugin: Mr. Sketchy-Poo

So I want to make a plugin that allows me to make quick sketches on my posts.

First I’m going to install a local wordpress on my comp to work with.

Turns out I didn’t have mysql installed



Probably might want to pick a different password or whatever.

Following 5-minute setup guide.

cd into the wordpress folder. Run the following to make a server at in the unzipped wordpress folder

Changed wp-config-sample.php to wp-config.php

and put all my passwords and stuff in there



So I found this script

and ran it.

Turns out need to replace localhost with

I don’t know why. Whatevs.

Smooth sailin.

Made my username wordpress and password wordpress. Don’t host this for real.


Installing something by going to a webpage is so goddamn bizarre. I feel like I’m in 1995 or some shit.

php sickens me.

It’s fun being a snob! ^o^


Here’s some useful looking links

Okay so the first one seems good but its antiquated

Led me here.

The way buttons are made in tinymce has changed. Check out the new way.


I had some trouble getting the mouse to actually draw where it should. I ended up using a recursive travel up through the page to add up all the offsets as seen here.

The approach I decided to go with was making a seperate php file that the jquery request will post the image data to.

the wordpress function media_handle_upload can be called on the server side.


I didn’t realize how hat i also needed to include wp-load.php from the example and was getting weird __() can’t be found kind of errors.

This was helpful in packing the images into blobs and the forms in a way that wordpress likes.

The jquery ajax is quite particular. Apparntly you need to include the lines

contenttpye false, processdata false in order for it to work.

I just took a wild stab at inserting the image with the img tag and it seems ok.



Find it at




We need to build that back end baby. The butt so to speak. Where the action BE AT.

The idea is to have collaborative aiming of our laser across the internet.

Check it out

So we’re gonna docker this. Because we’re off the goddamn chain.

Ben already has some code on his github

That we’re going to modify to our needs. He essentially used as a base level + some basic docker

So this already does what we need it to do basically. Just change the name of the git repository and it’ll boot up the server.

check this out for more deets.

“I built it with  “docker build -t laser .”
and ran it with “docker run -d -p 80:3000 laser””- Ben

Okay, also technically we need a front end too, so

duct taped together with the chat application and full screening.

We just need to tell the server when touch is down and where. We normalized x and y to be ratios of 0-1 fractions across the screen. It seems we can’t rely on not going a little over 1 maybe so be aware.

The part is very straightforward.

The express stuffjust serves the ordinary webpages. (app.get)

The only thing kind of funky is storing data associated with each client. We just attach it to the socket object, which should be self cleaning to some degree. We also add a timeout just in case we somehow lose a touch end. Maybe unneccessary.

Polling the path /location will return json of the average position of everyone touching the screen.

All in all pretty straightforward. And it seems to work with our phones. Except not Beth.

Now onto the microcontroller code. Should be simple, but for some reason is not. We have to glue together a couple of things if we want to bolt the arduino to an esp8266. Alternatives are to go native on an esp8266 or use a Photon. It is bizarre to me that one of these is not a clear winner. Why is it not so incredibly easy to make http requests on the Photon?

Also, a comment: Being name the photon makes it impossible to search for you. It sounds cool, but it’s a bad name.

Aiming a Laser Project

So we hot glued two servos together and the to a mirror.

We’re aiming a laser at it. A blindingly powerful laser

Essentially Servo B controls the angle in the x-y plane of the mirror and servo A controls the z angle to that plane.

The mirror law is v_2=v_1 - 2(v_1 \cdot n)n

Where all are unit vectors. v_1 is the incoming, n is the mirror normal and v_2 is the outgoing unit vector.

We fixed the laser to the base so

v_1 = \hat{y}

The outgoing ray must hit the ceiling (at a height R) at position x,y.

v_2 = (x,y,R) \frac {1} {\sqrt{x^2+y^2+R^2}}

Here’s a nice observation:

v_2 - \hat{y} \propto n

So we have an algorithm for finding n right there. Find v2, subtract off 1 and then normalize the resulting vector to get $latex \hat{n}$.

Then finally we can write n in terms of the angles \alpha,\beta, which heavily depend on our conventions of where angle 0 is and whether the servo spin clockwise or counterclockwise.

I believe ours came out to be something like:

n = (\cos(\alpha)\sin(\beta), -\cos(\alpha)\cos(\beta) ,\sin(\alpha))

In all honesty, we coded her up, then fiddled with minus signs until it was working. Not necessarily a bad way of going about things. Find the things to think about and find the things to just try.

Then here is the code: