Archive for May, 2017

Goddammmit!

Posted in Orange Pi on May 31, 2017 by asteriondaedalus

So, go figure.  One is told One should either ssh into the OPiZ via ethernet OR the other option is the three pin serial connection on the board.  Examples included wiring instructions and the use of a 3.3v USB to serial board (like the Sparkfun one I have in my comms box).

So when you startup Teraterm, for example, you can select a COM po … hang on, there is two COM ports sho … DOH!

I had to laugh, I was wondering why, if you have your OPiZ powered by the USB you couldn’t talk down that line – given all the instructions to either ssh in via ethernet or knock up jumpers to use a USB2Serial board.

Seems none of that is necessary.

Just power up the board with your USB hub and you have a COM port as well.

I am still not happy with the dropout on the ethernet line but I can sort that once the pounce administrating from the OPI forum gets off his arse and validates my membership.

Otherwise, you don’t need telneting over ethernet or jumper leads to the three pins that should have been, IMHO, 0.100″ (2.54 mm) Female Header: 1×3-Pin, Straight.

In any event, it means I can sort the erlang build that kept clapping out as the terminal connection over the LAN kept dropping out.

GIVE ME A BREAK!

Posted in Orange Pi, Rant on May 30, 2017 by asteriondaedalus

FFRRRRRRRRRRRRAAAAAAAAAAAAAAAAAACCCCCCCCCCCCCCCCCCKKKKKKKKK!!!!

Now I have node-red running on the Orange Pi Zero (OPiZ) I thought I would try something to sort the problem I was having on the ODROID-C1 in any event.

That is, I have a google api account for the calendar widgets for google calendar to drive the running of the sprinkler system (I relented and stayed on the PC version which grates with the wife because of the electricity the PC burns).

In any event, for whatever reason,  the google API call-back was against localhost so it should have worked on whatever host was logged into the account.  However, the picture is confused I guess since it is a client API.  So what is the client?  The Web browser browsing into the node-red server OR the node-red server?

The other side was I wasn’t sure the MAC address of the “client” wasn’t being picked up in the background as part of registered “client” identification.

So, I thought, since I was running a server but not desktop version of debian on the OPiZ then I would install a text based browser and log into google developers that way, create a new api licence from the OPIZ, and then voila!

However, I tried using apt-get to install Lynx but gave up after a dozen attempts.  Tried Links instead.  Slow but I guess it has to parse then discard a shit load of junk.

I pointed Links at the google developer’s login page.

It wouldn’t let me in.

I thought I had forgotten my password so I reset the google password but it wouldn’t let me in.

I opted to go in via other credentials.  It sent me an sms, I entered that in and then it prompted me for a password and then wouldn’t let me in.

This went on a while but I tried an option that allowed me to put in at least one of my old passwords.  I used my new password, it told me that was the correct password and gave me the option to continue.

I opted to continue.

It the prompted me for a passwo ….

Yep, it wouldn’ t let me in.

I am now no closer to finding out if setting up the API from the target server fixes the problem.

Against my better judgement I might relent and put the desktop version of Debian on the OPiZ – just so I can get at a browser.

The real problem, for whatever reason, is that apt-get crap.  I went to download erlang to find I couldn’t install some of the dependencies AND, for whatever reason, wget will not find the erlang download site.  I checked on my PC and it is definitely up.  I use ping on the OPiZ but it doesn’t seem to get out BUT then apt-get was fine to remove then download Links (as an experiment).

To top it off the OPiZ keeps dropping its connection to Telnet over the LAN, even though I setup a static IP.

I will have to built up a serial cable as I am convinced that there is something flacky about the ethernet setup (which might account for apt-get cracking up all the time in mid-stream).

Pity, the OPiZ seems really fast – flashed up the node-red sooooo quickly.

I need the erlang on for OPiZ to act as the MQTT server as well.

Make up your minds people!

Posted in Rant on May 30, 2017 by asteriondaedalus

privacy

Keep it private while telling every fracker where you are, but yes don’t trust your private data to the cloud driven by not one company that has independent security assurance certification.

Triple Gag!

Posted in Linux, Orange Pi, The downside of Opensource on May 30, 2017 by asteriondaedalus

So, can’t install node nor npm from apt-get on either armbian (ubuntu or debian) for Orange Pi Zero.

The Googledrive links on the Orange Pi page were duds so I reluctantly went to the Baidu Cloud link.  Baidu Cloud is so slow that for the longest time I thought it had no files at that location – it took upwards of 5 minutes to load the webpage.  That was the reason for going to the armbian distro.

So, finally got the “official” debian distro for Orange Pi Zero.  A Gb that when burnt to SD gives you a whopping 65Mb??!!

Runs.  But it also prompts you to run a command to expand the disk.  So I did.

I then had to run SDFormatter and reload the disto because once you run the disk expander your OPI drops its connection to telnet and you cannot re-connect ever again??!!

The other way to break your “official” OPI debian distro is to run nmtui to set your static IP and host name etc.  Go figure, I was doing that ad nauseum on the armbian distros but on the “official” opi distro you can never get a connection ever again.

I have gone back to the armbian debian distro.  Rather than frack around with setting static IP on the OPI I set a fixed IP address to its MAC on my GATEWAY instead.

I am going to try the binary distro ahead of any stupid attempt to build it all from source.

Something like:

wget https://nodejs.org/dist/v6.10.3/node-v6.10.3-linux-armv7l.tar.xz 

tar -xf node-v6.10.3-linux-armv7l.tar.xz --directory /usr/local --strip-components 1

DOH@!$!#

While I was typing this blog entry the opi dropped out??!! So, apparently, the reservation of IP from the DHCP is not permanent SO back to nmtui – at least that doesn’t crack up the OPI when using armbian debian … yet.

 

 

Gag! And double Gag!

Posted in Linux, Orange Pi, The downside of Opensource on May 28, 2017 by asteriondaedalus

So, I downloaded Debian server for Orange Pi Zero ( the Armbian thingy).

I logged in using Cygwin terminal.

Ran the following:

sudo apt-get update && sudo apt-get upgrade

Go figure it would run for a while then drop out the connection.

I had to log in a couple of times.

Had to run the following to tidy up.

sudo dpkg --configure -a

Eventually got to a state where I could install node-red so followed instructions at a helpful website.

Got down to where you check for npm and node versions.  No error reports displayed previously.  However, when I tried to run npm or node to get the versions system could not find them.

I went to have a look at the bin directory.  The following directory exists but was empty:

/usr/bin/nodejs

Very grumpy.  Even a clean install is not working.

I am going to reformat the SD card and then try setting a static IP address for the board as I think I have some of the problem as the IP address expires on my while in mid session.  Something was likely not right after the update/upgrade.

Why priori knowledge is so irritating

Posted in Factor programming language, FORTH is it dead or isn't it? on May 20, 2017 by asteriondaedalus

Something so simple, if you have example code on your blog why on earth do you not included the includes.  Priori knowledge is not immediately explicit.

I bumbled through the example of constraint based programming in Factor.  Go figure, the actual code should be:

USE: backtrack
USE: locals

:: solve-711 ( -- seq )
    711 iota amb-lazy :> w
    711 w - iota amb-lazy :> x
    711 w - x - iota amb-lazy :> y
    711 w - x - y - :> z

    w x * y * z * 711,000,000 = [ fail ] unless

    { w x y z } ;

Run it with:

IN: scratchpad solve-711 .

Still, the debugging is fantastic and will suggest vocabularies to include (which helped sort out the missing “includes” aka USE:).

Interestingly Factor has a vocab “models” which sniffs a bit like the idea of models, in the first instance from MVC, but then subtly not unlike the way “model” is used in Elm and therefore Functional Reactive Programming.  Cool.

Although, its Concatenative Reactive Programming really – although that’s postfix functions rather than prefix.  Cool.

The difference is important though.  Elm “compiles” to JSP to “compile” to byte-code to run on the JVM.  In Factor, you are reactive in Factor.

Now, the key difference between Factor and Forth here is that Forth is for embedded systems.  Factor is not.  While you can squeeze Forth onto an AVR chip, they don’t even bother anymore with Factor on ARM.

Still, I get a queasy feeling it’s the FORTH community all over again.

It has just occured to me …

Posted in Chapel, ConCurrency, Erlang, ODROID-C1, Parallel Talk, Parallella on May 19, 2017 by asteriondaedalus

… what a coincidence.

The Parallella and the Odroid-C1 PCB are same size (almost).  Is that Feng Shui, synchronicity or serendipity?

Pity the post holes don’t line up.

Swapping out …

Posted in MQTT, node-red, Orange Pi on May 19, 2017 by asteriondaedalus

… or in.

To give my cluster back an ODROID-C1, I got a 512M Orange Pi to host the mqtt and node-red for my house automation.  It is tini, even with the case ( a couple of match boxes in size ).  So, un-obtrusive to boot.

I will get a couple more once I have sorted some software to monitor my barking dogs.    Python based signal processing to detect the dog back and then, perhaps, hooked into sprinkler zone the dog barking is detected in.

I have an IR sprinkler guarding the side of the house.  Neighbors complained that they’d been barking daily for 12 months, why wait 12 months before telling me?  So they became set in their ways.  However, the sprinkler works the dog psychology as it breaks the fixation on the noise.

However, of course, I want to be a little more sophisticated.  I want to record the activity so I will get a camera for the OPi later.  Wifi it up to the home PC.  Because it has GPIO ports it could also drive a solenoid valve, a horn or a shaker (marbles in a coke can will distract the dog as it doesn’t like that type of noise).

Untitled

Parallela turned up so it and the C1 will be fitted this weekend.

I relented on the idea of an old multi cpu server.  I am fickle … I know.

Quality Control

Posted in Sensing on May 13, 2017 by asteriondaedalus

So, I decided to put a dispute into Aliexpress to get half my $5 back on the lens I ordered.

No markings so you can’t easily tell what focal length it is supposed to be.  Go figure, I pinged the vendor and asked how they know what lens to send if there are no markings and they “apologized” as they couldn’t tell me what focal length it was.

On principle then I will try to get half my money back, which is likely less than the transaction fees on VISA card but will make the vendor think about their quality control – I hope.

Go figure, in the end I found a couple of 2.8mm f/l lens that are marked and decided I can play with the one I have and get an even tighter f/l in which (again) increases the maximum velocity over the ground the sensor can be used for BUT IMPORTANTLY that means I can trade that off and get the sensor closer to the ground for use on my rock crawler.  The 3.6mm “imposter” does bring the sensor height down but it also has a 90 degree field of view which constricts it somewhat.  Any hint of motion in the field of view goes towards the odometry doesn’t it!

The options I had were 100 degree and 110 degree field of view.  I opted for the 2.8mm f/l 110 degree to get more image crammed in.

Arrrrrrrrrrrrrrrrrrrrrrrrrrrrr…

Posted in Help Request on May 10, 2017 by asteriondaedalus

…rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrggggggggggggggggggggghhhhh!

The new lens turned up for my PX4FLOW BUT, of course, it cam wrapped in foam, no details and no markings to confirm it is, in fact a 3.6mm f/l.

How on earth do I work out if they sent me the right one?  I have to set up an optical experiment.

Hmm.  The image size was much bigger on the 16mm f/l that came with the Pix4Flow.  I had it looking at a small pewter mug, with raised relief, I have my pens and pencils in.

At the same distance, the new lens shows most of the mug, while the olde lens is zoomed right in on the raised relief.  This is what I expect (here is a calculator to play with).

It will likely do.

Here is the lens for sub $5.