Archive for October, 2014

Not quite right

Posted in Altera Labs, Cyclone II Experiments on October 22, 2014 by asteriondaedalus
Not quite right but ...

Not quite right but …

… it should be.  Segment ‘B’ seems to want to light up when buttons are set to b’1010 and b’1011 (aka 10 and 11).

This is odd because the logic table is:

adfasdssf

Hmmm

Now, before you start, remember the logic had to be inverted to account for the inversion of the switch circuitry – so count from 0 up from the bottom.  Term 6 is actually then ‘9’ and ’10..15′ is terms 5..0.  Notice all the outputs are 1’s post 9 as the Lab 1 of tutorial 2 requires.  Segment ‘B’ is output ‘F1′.

Minimized it gives us this:
F0 = A B C D’ + B’ C D + A’ C’ + A’ B’ ;
F1 = B’ C D’ + A’ C’ + B’ C’ D + A’ B’ ;
F2 = B C’ D + A’ B’ + A’ C’ ;
F3 = A’ D’ + B C D’ + B’ C D + B’ C’ D’ + A’ C’ ;
F4 = A’ C’ + B’ C + D’;
F5 = A B D’ + A’ B’ + B C’ + C’ D’;
F6 = A B C + B’ C’ D’ + A’ C’ + A’ B’ ;

Hmmmm

Hmmmm

So, I may have to work through this as the logic.  First I will convert the LogicFriday version into gates and code it into Deeds to see if it is actually wrong or if the compiler is doing something funny.  Although, this is what will need to go into Deeds:

Grrrrrrr!

Grrrrrrr!

Advertisements

Why?

Posted in Agile Smagile, The downside of Opensource on October 19, 2014 by asteriondaedalus

Caught a glimpse of a module for Fitnesse that mimics Cucumber – the so-called BDD environment for Ruby.

Why?

Is Cucumber really BDD?

Is Fitnesse not BDD?

Is BDD Agile?  Lets start there. No it isn’t.

If you go back and look at the software engineering standards that have been around for a while, the one’s Agile droogs don’t ever read, then you will know the idea of driving your program with V&V is a best practice.

The problem is Agile droogs never read the work that came out of the “software crisis” that was produced to 1) account for why software was so poorly produced and to 2) not go there again.  So, we all go there again and again.

TDD and BDD on same page!  DOH!

TDD is an abject failure.  The idea was to write tests once and then code until the tests passed – and then stop.  Great but you need a design for that – to know what tests to write.  So the thing fell apart because it never worked as advertised – don’t do design, don’t know what to test and why, write tests many times, falling back writing code, without requirements or design, then writing tests to match code … wretched.

It was actually interesting to watch the evolution of BDD.  It sort of came out of the TDD as a mutant six toed, three eyed, swamp thing.  BDD also came out because TDD was a failure. Why? Agile.  Meets project manager WISCY itch – Why Isn’t Someone Coding Yet.  So yes, write behavioral tests, don’t write unit tests, costs less right – except for the distance between the behavioral specification and the units … not to mention that pesky obfuscation of the behavioral aspects because you are working is the structural idiom of object orientedwatzit.

So we start coding earlier because we are convinced we can test at the unit level and somehow get a design that meets requirements we haven’t written with a design we haven’t documented.

Primary reason was TDD also tended to focus on unit testing. So, writing tests, without design, for units of what? So now we want to write tests first for behaviors because we don’t want to call them requirements because of the bad press requirements get because we don’t learn from our mistakes.

No design meant there was never really any chance of writing tests once – since you never really knew why you were writing the tests.  Except, of course, that your units (aka classes) where beautiful.  Why were they beautiful?  Why they passed the tests that weren’t supported by a design.

Some goof actually wanted to argue once, long lost on interweb, that TDD was the design!  Except is wasn’t written once and run many times. It was written over and over again because there was no design.

So the swamp child thing of BDD.  Fancy no design caused TDD to flop.  So now we are starting to jump somehow from behavior to code without design in between?  And how does one reach into the obfuscated object orientedwhatzit from the behavioral space without design and functional allocation?  You remember functional allocation?

And then when you look, Cucumber looks to talk at the obfuscated object orientedwhatzit unit level in any event.  They are getting there TDD and BDD confuse me thinks.

Good support at gobot.io

Posted in Beaglebone Black, CROSS COMPILING on October 18, 2014 by asteriondaedalus

The team at gobot.io sorted the access to the user LED on the BBB but an interesting problem or two.

The code does not run on the embedded Angstrom that came with my BBB.

The new BBB come with Debian and apparently the LED are set up differently between the distros.

Additionally, while I could scp the cross compiled binary to my Angstrom, using a cygwin terminal, it wouldn’t work the same way when I had the Debian SD card in.

I found that I could SSD SCP from my TeraTerm to the Debian distro however.

So I was able to run the blinking demo from gobot on the Debian distro.

I just have to be brave and bomb the Debian onto the BBB.

Case closed.

Setting up the ODROID-W

Posted in Embedded, Erlang, ODROID-W, Raspberry Pirate on October 10, 2014 by asteriondaedalus

A second package turned up in my PO box from Hardkernel.  It was the extra ODROID-W for my parts drawer and also the connector sets I forgot to get.  Trying out the ODROID-W plus base board was a little hard without the connectors, yes?

Ah! That's better.

Ah! That’s better.

A little soldering etc. then bomb Rasbian onto an SD card, then dump the Erlang and, yes, the blinking LED experiment.

This weekend I promised myself.  I have already put lighting up a Beaglebone Black with the cross-compiled Erlang experiment I put together on my 32bit Debian box.  I just need to sort the SD card reader/burner on that machine.

The box that turned up also included four button cells for the on-board RTC (you know the one the Raspberry Pi doesn’t have).  So, I had forgotten I had ordered those, I ordered 8 button cells from them to get connectors for the board for the lipo cells, not the other day.  So it means I can sort out battery power for the board ahead of schedule.  All good.

Erlang on Raspberry Pirate ODROID-W

Posted in ODROID-W, Raspberry Pirate on October 2, 2014 by asteriondaedalus

There is a port of Erlang for Raspbian that should run on the ODRIOD-W and some guy has ported Erlang onto AR-Drone 2 to run as its flight management system.  So installing a port of that to Erlang running on ODROID-W seems a worthwhile endeavour.  I have a spare 10DOF with a mpu9150 and a air pressure sensor ready.  The problem will be the Broadcom chip only has two PWM channels so I will have to sort that with either a AVR chip or …

POSTSCRIPT

The irony, or is it incongruity, of Erlang on Raspberry Pi is the inclusion of the hardcore csp programming on the nooby platform. Observation though is that the Maker community targeting schools is maybe not going to fuel the imagination as intended.  My nephew is a good example.  Wanted an Arduino for school so I got him one.  By the time it turned up he need a Raspberry Pi.  I got his Raspberry Pi working from his Mac, his Arduino from his Mac, his Arduino from his Raspberry Pi from his Mac.

He ran through a few Arduino experiments but preferred downloading and running a game (Minecraft) on his Pi, until the inconvenience of working on the Pi turned him off it.  He has now jumped from a short stint in Java, through ObjectiveC to Swift (probably for a week).  Never once staying long enough on anything to bed things down and get any good at it.  This is the downside of the so-called Maker world.  It is consumerism and mostly about feeding the short attention spans we’ve developed.

Curiously, he has asked me to help him with a school project now in Python.  Setting up a web-based application for some school process.  Just like that, a multi-tier MVC application.  Should be doable using the right frameworks – python has a few – but I am working off 30+ years engineering experience and will be interested in exactly how this will happen when the lad flips over things so superficially.

Regardless, it takes up back to his Pi, for a while – but for how long?  How many other people are seeing this?  Lots of short spanned, stalled interest?  Marketing gurus dream I think.

Batteries smatteries

Posted in Embedded, Erlang, Raspberry Pirate on October 2, 2014 by asteriondaedalus

Gag!

I ordered a couple of extra ODROID-W without base board – just to have on hand for those spontaneous projects.

I haven’t ordered any batteries from Hardkernel due in no small part to the problems ordering batteries from overseas and the hassle with conniptions about lipos and fire.

So, I thought I would buy batteries locally.  They have JST and not  Molex 51021-0200 connections but I thought I would just add a jumper to the battery.  Ordered Molex jumpers to find, go figure, they are too big!

So now I have to sort out batteries from Hardkernel – if and only if they can send them.

The saving grace will be they sell button batteries for the RTC that have the right Molex connector.  Worst case I have to buy 8 of those to get the 4 molex connectors I will need for my ODROID-W boards.

POSTSCRIPT

So, to get the molex connectors from Digikey they will cost $0.34 (that is 34 cents) for ten.  Then $34 (that is 3400 cents) to post.  Why? They’d fit in an envelope with a stamp!  I ended up ordering 8 RTC button cells from Hardkernel.  They have the same connector so I will snip 4 and piggy back the connector on the batteries I bought.  If you think about it that is necessary because the batteries still need charging and the new molex connectors will not fit the charger – catch 22.

No real biggy.  Most RC batteries have two connectors, one for charger and one for power train.

VHDL DIGITAL LOGIC LAB 2

Posted in Altera Labs, Cyclone II Experiments, FPGA on October 1, 2014 by asteriondaedalus

I’ve been bad.

So stay tuned, LAB 2 will be teased out as a study break during my Dissertation.

Update

I dumped Part I of LAB 2 onto the FPGA board and DOH!

There was a little twiddling to read the design across from the Altera boards to the MASTER 21EDA.

What I forgot was the switch logic is tied high and goes low when you press the switch.  So, no big problem really but since I am writing it up for followers I had to revisit the LogicFriday defined equations to flip the logic table.  The software has an invert function which has helped a couple of times BUT it inverts rows and does not flip tables.

Anyway, a little work to re-code the work and then it will start going up – as usual – one Part of the lab at a time.

Don’t hold your breath though – Dissertation started so will be infrequent for next 20 odd weeks.