Showing posts from February, 2018

Caenorhabditis Elegans (C. Elegans) Nematode Project

This project started with a couple of less than perfect hardware experiments but ended with some software fun. Without easy access to a 3D printer or even a laser cutter I am usually confined to using “off the shelf” boxes or serendipitous finds to house or support my projects. I can manage a bit of woodwork but this is usually at a “macro” scale (as examples, I reroofed our house and built a lapstrake canoe) and this makes me wary of attempting fine detail. I know I thought, “I will try Perspex”. A bit of online shopping took me to acetate sheet and I quickly ordered a sample. I had a couple of continuous servo motors sitting in my “bit box” and had in mind to use as the basis for a lightweight robot chassis. Then addition of a couple of wheels and a small ball castor looked likely to make a good trial for an acetate sheet platform base. A laser cutter would be great for acetate sheet as I quickly found out. It can be cut by scoring with a Stanley knife and snapping ove

A Uno stack based calculator

I had a lot of fun writing a simple BASIC interpreter to run on an Arduino but I could only get my version to run on an Arduino Due. Storing and manipulating lines of BASIC code required lots of available SRAM. I therefore decided to experiment to see if I could get something of worth to run on a Uno or Nano that applied similar programming techniques. I decided upon a program that can evaluate floating point numeric expressions. This had the utility of showing how my integer BASIC could be simply adapted to using floating point arithmetic as well as demonstrating the process of parsing and tokenising an expression while using a stack to evaluate a result. This program works just fine with the standard Serial Monitor window with expressions being entered to the “Send” text box although you should check that the “Line Ending” drop down list at the bottom right of the window is set for one of the options that includes a carriage return and/or newline. Code Commentary T

Arduino 2048

Using the PuTTY terminal emulator to support the development of a BASIC interpreter running on an Arduino got me wondering about the potential for even greater interaction. What better than a game?  PuTTY supports VT100 escape sequences for positioning the cursor on screen and also has some limited support for colour. This was sufficient for a version of the 2048 game originally devised by Gabriele Cirulli . You can play it online at My Arduino C version uses the keyboard arrow keys (on the PC running PuTTY) with the playing board displayed in the PuTTY window. SetPuTTY up with a serial connection to the Arduino with no local echo. ‘S’ starts a new game at any time. ‘X’ starts a test solver that maximises the score from every move ‘Y’ starts a test solver that uses a repeated pattern ‘Z’ available on the Arduino Due version starts a test solver that uses a Monte-Carlo simulation VT 100 control VT100 terminal control es