Fred's Home Page

Main
About me
Crumble
csh is bad
Debian
FredCam
Guppy
Hardware
Help out
Java-glossary
Job-control
KRoC/Linux (old)
Lambda
Life-stuff
Links
Linux
Mesh
Misc
Music
occam
occam upgrades
occam tutorial
OpenUPSd
Pictures
Programming
Projects (PhD)
Publications
Quick gdb
RAPP
RMoX
Software
UNIX crashcourse
UWG
UWGBuilder
WG / WGBuilder
XDM-Choose
XHPD

Life-Stuff

(some people call these things blogs)

The last 8 entries are displayed on this page, older ones can be found here. An RSS feed is available here.

28/01/2014

Straight into the thick of it, oof. Mostly spending time preparing teaching for this term, and I have a lot! Also picked up an extra 20% role as "Undergraduate Director of Studies (QA)", that really does require some time put into it! (and a good excuse for some crude PHP hacking to build a coursework deadline co-ordination/planning thing — as a colleague said, an interface only a mother could love, but hey, it works! ;-)).

Managed to put a bit more time into Guppy and the EV3, heading closer towards my 4x dining-philosophers. The LEGO is built but untested, and I only just tested driving the motor from Guppy the other day, but that sort of worked (needs my Github version of Ralph Hempel's ev3dev-modules that has the /dev/ interface in it). At the moment it looks like this:

@include "guppy_stdlib.gpi"

@external "guppy" "define ev3_pwm_init () -> bool = 64"
@external "guppy" "define ev3_pwm_shutdown () = 64"
@external "guppy" "define ev3_pwm_on_fwd (val int motor, val int power) = 64"
@external "guppy" "define ev3_pwm_off (val int motor) = 64"


define test_g56 (chan(string) screen!)
  timer tim
  int t
  bool b
  seq
    screen ! "hello, EV3 world!\n"
    b = ev3_pwm_init ()
    if (b == false)
      screen ! "failed to initialise PWM device..\n"
      return

    tim ? t
    ev3_pwm_on_fwd (0x01, 30)
    tim ? after (t + 300000)
    ev3_pwm_off (0x01)

    screen ! "done!\n"

    ev3_pwm_shutdown ()
end

Just back from visiting the Stella Maris Primary School in Folkestone, showing a group of year 4 children some LEGO robots and answering a lot of fairly inquisitive questions! Also met Stella the class gecko, which was a fairly placid but quite large creature.


01/01/2014

Happy New Year! :-). Picked up where I left off getting an MSc student project from last year ready for teaching in a few months. This is a simple IDE for writing AVR assembly aimed at the Arduino Uno, written in C++ (g++) using Qt (and the pretty snazzy Qt Creator IDE) also using QScintilla, calling nocc to do the lexing for QScintilla and for assembling the code proper (then avrdude to upload to the Arduino). Decided for a second time that I don't care much for object-oriented in C++. Whilst the abstraction is mostly comfortable (and does apply well to some things), layer on layer of inheritance and overriding can make it very hard to follow independent bits of code within the system, without some broad global knowledge. For the time being I'll stick to my default C approach of structures and lots of parameters-passing.


28/12/2013

Had some crazy wind+rain on the 23rd that nearly took a tree out (now it's just leaning precariously). The storms managed to take the power out too (again, really need to replace the UPS..). The only device that survived the 8+ hour outage was my LEGO EV3 (running at essentially zero load) which has now been up for 15 days!


17/12/2013

Dangers of living on the edge (of operating-system distributions): after several days of NVIDIA kernel mismatch warnings and other semi-upgraded machine unhappiness, the X server finally vapourised itself, taking with it around 80 xterms and 83 VIM sessions (neatly awaiting recovery) :-(. At least things seem more stable after a good reboot :-).


14/12/2013

Erlang up and running on the EV3 again, so time to continue prodding that one. Also writing some code for the Arduino Uno based RF receiver for a student project, getting close to the point of having it send UDP packets (with nothing much in them to start with!).

One of our cats broke my yellow plate, very sad. broken plate Bought this back in 1998 from Tesco, along with a yellow duck (I think Steve still has his!), whilst a student. Keeping eyes open for a replacement though!


13/12/2013

Was about to start doing something more serious with the LEGO EV3, then got distracted because I'd somehow bricked the SD card. Lots of block device errors started appearing, which led to something going bad. Possibly some issue related to my D-Link USB hub, or software handling of it, since plugging it direct into the host made all those problems go away. Also discovered that the good folk at mindboards github repo (Ralph Hempel) have made a Debian distro for the EV3. After some prodding and poking, this now boots successfully :-). Just in the process of getting Erlang running on it again, using the same cross-compile toolchain (Sourcery G++ Lite 2009q1-203), which built hello-world okay. Tried a more recent version (Sourcery G++ Lite 2011.03-42) but that failed to build an executable, for now.


11/12/2013

Another year ticks by, many thanks to all for birthday greetings and presents :-). Many thanks and love to wife for a shiny espresso/cappuccino machine, which does a lovely job :-).

Some more prodding around with the LEGO EV3, this time to get Erlang running on it. After some prodding around with the cross-compile stuff, which by and large worked as the HOWTOs suggested (++), have a seemingly working Erlang system running on the EV3. This (probably a poor example) hello-world program:

-module(hello).
-export([hello_world/0]).

hello_world() ->
	io:fwrite("Hello world from Erlang!\n"),
	io:fwrite("  version:   ~s\n", [erlang:system_info(version)]),
	io:fwrite("  OTP release: ~s\n", [erlang:system_info(otp_release)]),
	io:fwrite("  system ver: ~s\n", [erlang:system_info(system_version)]),
	io:fwrite("  system arch: ~s\n", [erlang:system_info(system_architecture)]),
	io:fwrite("  machine: ~s\n", [erlang:system_info(machine)]).

is compiled and run in the Erlang shell (erl) thus:

frmb@EV3:~/erlang$ erl
Erlang R17A (erts-5.11) [source-236b48c] [async-threads:10] [kernel-poll:false]

Eshell V5.11  (abort with ^G)
1> c(hello).
{ok,hello}
2> hello:hello_world().
Hello world from Erlang!
  version:   5.11
  OTP release: R17A
  system ver: Erlang R17A (erts-5.11) [source-236b48c] [async-threads:10] [kernel-poll:false]

  system arch: arm-none-linux-gnueabi
  machine: BEAM
ok
3>

Next up, time to prod around with the EV3's motor and sensor interfaces, which the LEGO folk have done a great job of documenting nicely :-). Then some gluing together of this stuff with the Erlang Embedded ALE framework.


08/12/2013

FIRST LEGO League regional finals happened, successfully! :-). Managed to get myself on the evening news too, which was nice! (although perhaps slightly odd, since it's me responding to the presenter/interviewer's question, but without the question). Well done though to the independent team of three who came up an awesome contraption to solve this year's challenges (and got a score of 500 plus). Apparently there was some scepticism about whether they had done the work, but having (randomly as head tech-judge) sat in on their technical interview, I'm pretty confident that they did! That consumed most of last week, the rest of which was getting over some cold/flu thing (and a necessary trip to the GPs for some antibiotics).

Previous hamster (Muesli) died a month or so ago :-(, but we got another one from the local RSPCA centre (Leybourne) :-), newly named Twiglet. He's a touch overweight, confident, but not too sure how to drive the hamster-ball yet — more learning required.

Built a fun box of hack for part of a final-year student project, involving an Arduino Uno, ethernet shield and a hacky home-brew board to connect an RF650. Just spent part of the weekend finishing off the soldering and cramming it into a project box. box shut box open Completely untested and unprogrammed as yet, but a prod around with the multimeter suggests it's electrically viable at least. The plan is to have a bunch of these (minus the ethernet shield) dotted around the lab, sending sensor data to the one shown, which will then dispatch over ethernet (and the project group will do something useful/meaningful with the data collected). This one needs to be plugged in, but the others can likely run off 9v batteries (as they're not trying to drive an ethernet).

Due to running rsync --delete-before in the wrong place, managed to trash a whole lot of my files :-(. Mostly my Z80 collection of stuff, which was a little tragic, but not catastrophic. Looks like I'll have to start Spellbound Dizzy again, since my save-game-image got trashed. This is where colleagues probably remind me about the value of backing stuff up... (I settle for mirrored disks mostly).


Last modified: 2014-01-28 15:40:13.945287694 +0000 by Fred Barnes [ds] [plain]
Page generated: Tue Jan 28 15:40:15 2014
Valid XHTML 1.0! Valid CSS!