Showing posts with label hackery. Show all posts
Showing posts with label hackery. Show all posts

Sunday, 4 December 2016

Really? starting services properly is that hard

I reaaaaally don't care if it's Raspbian or Debian screwing up the startup of nfs-kernel-server, it should have been fixed long ago.

And there are endless posts on debian raspbian and other forums about this, many with fixes that only work in very specific (unstated) circumstances.

In the end I just got out me Glasgow screwdriver and
stuck a new line in crontab to postfix the mess.

sudo crontab -e

and add the line
@reboot              sleep 5 ; /usr/sbin/service rpcbind start ; sleep 10 ; /usr/sbin/service nfs-kernel-server restart

Tuesday, 12 July 2016

poe thoughts and findings with Raspberry pi

I've used 2 splitters for this. One specifically sold to power Raspberry Pi, the other a more generic one, but it is cheaper and more flexible (it can output at 5V, 9V or 12V - obviously for direct power to a pi, it is on the 5V setting.

The switch in front is a Cisco SG200 08P, which is expensive, but provides close control and reporting on what is going on with each port. Much cheaper PoE switches (like the Netgear prosafe range) are available (but typically don't have the reporting I used here).

The ASIX AX88179 is the main part of a USB3 to Gigabit ethernet adapter. The Pi can drive significantly more than 100Mb with a Gigabit adapter (even although it is USB2). all the Gigabit USB adapters seem to be USB3 (quite sensible if you want to get close to full utilisation). Also being Gigabit means that potentially the green ethernet savings should kick in.

As a final test I had the Pi Zero running RPi cam control streaming live to a web browser on another PC, and with 2 servos waving the camera about. This took the power up to nearly 5 watts with everything running smoothly - apart from the live camera feed which was just a blur!

Conclusions

The TP-Link PoE adapter is the better solution - more flexible, more efficient AND cheaper.

The Official Rpi WiFi dongle seems to run at about 1/2 watt when idle.

The USB3 to Ethernet adapter I got is VERY inefficient - about 1 watt doing nothing.

You can run a pi very reliably this way - even with the camera and little servos running.

poe splitterloadpoe classpower (mW)current (mA)voltagegreen ethernetnetwork
RocksolITpi 3 idling419004247Nopi Ethernet
RocksolITpi 3halted48001747Nopi ethernet
TP-Link PoEpi 3 idling018004047Nopi ethernet
TP-Link PoEpi 3 halted07001547Nopi ethernet
TP-Link PoEpi 3 idling016003447Nonone
TP-Link PoEpi 3 idling025005447NoASIX AX88179
TP-Link PoEpi 0 idling012002647NoRPi wifi dongle
TP-Link PoEpi 0 halted0400947NoRPi wifi dongle
TP-Link PoEpi 0 idling010002247NoUSB3 - Gigabit no lan cable
TP-Link PoEpi 0 idling017003647YesUSB3 - Gigabit connected
TP-Link PoEpi 0 idling07001547Nono network adapter
RocksolITpi 0 idling413002847NoRPi wifi dongle
RocksolITpi 0 idling48001747Nono network adapter
TP-Link PoEpi 0 busy + servos046009047NoUSB3 - Gigabi

Sunday, 10 July 2016

Making google cardboard work properly (with a web browser) part 1

First experiences with Google Cardboard were that things looked 3D, but it always felt a bit weird and uncomfortable. Usually the 'not rightness' got worse as I looked further from the centre of the image. To start with, I messed around with profile generator, but soon came to the conclusion I was starting from the wrong place.
Could I make it better?

Having worked out what I thought was the problem, the answer is yes, it can be made LOTS better (well it is for me anyway)

I decided that there are 2 main problems:
  1. because the lens spacing doesn't match my ipd, and the lenses have a fair bit of distortion, there is a small sweet spot and as I looked away from the sweet spot, the 2 views diverge in ways my brain did not like. This makes things feel more and more 'not right' as you move further from the centre.
  2. The lenses introduce a lot of pincushion distortion - I suspected that while not ideal, things would look a whole lot better if the spacing is fixed even with this distortion.
Of course having fixed item 1, a new profile should make the google app (and others that use the underlying cardboard API) look a whole lot better as well - after generating a new profile.

Google cardboard is set up for an ipd of around 64mm, and I measure my eyes at 67mm, but even this small difference seems to have a big effect.

So I set off a couple of days ago to:

  1. fix the ipd to lens mismatch.
  2. write an app (web page) that would allow me to view stereo pictures in a web browser.
and so our quest begins.... Part 1 is below, part 2 is here