Playing w/ grandkids allows me to go back and be a kid again... now with things I could only have dreamt then... so it is Back to the future.

Introducing one of my grandsons to STOKYS / Swiss-version of Meccano / Erector sets of metal as a next step after the wooden versions, 'we' built a basic train engine to run on garden train tracks (45mm / 1 3/4 - G - 1:24 since it models narrow gauge trains... LGB /accucrafthttp://www.accucraft.com/ )/ far-East knock-offs.

Some scavenged Espruino code from a previous project of a classic / retro sheet metal robot - not yet published - made it moveable... as you can see in the attached shot and clips... The step indicator lights of the driver can be used as the fire box glow of a real steam engine... especially when it is (backing) slow...

The motorization is just a simple-got-going and not adequate yet in regard of speed... also the efficiency is questionable: first a reduction gear as built into the stepper and after that a boost gear... but never mind, it made the show - ...show-up. In a follow-up post I present more details...

The code is very simple... what is not in place yet for the engine are the lights in the front and back... (which controlled the piercing eyes when it was part of the human sized robot). The UI is Web retro as well: plain html grey in grey... (suggestion of enhanced look in form of working code are very welcome). Since the robot lived before puck time, wifi was chosen for communication... now, it would probably be BLE... and a nice phone app...

The electronics is protected form short cuts by the metallic context in a recycled trow-away blister-pack that had packed something else in its previous life. So I could it even call ecologically responsible...

The power options are:

USB 5V Powerbank as used for phones and other USB powered devices, connected to Espruino-Wifi's USB connector.

The ULN2003 allows its own - higher 'volted' - supply, which may become an option - either for 6..12V battery or similar supply thru tracks / DC 2-rail. (Currently, the wheels are not isolated against one another (side-ways, so it produces for now a short-cut between the 2-rail DC technique as used. Therefore either the bought stuff runs or the DIY runs...).

@Gordon and @Wilberforce, thanks for the input. Yes, I already used the literal. This was some 'old' code, I guess it was before literals were available... The only change to the code was the EYE/S to LIGHT and RADAR to Engine (STOP). ...Never happened to me that I could reuse code this easy.

Post a reply

Bold

Italics

Link

Image

List

Quote

code

Preview

Formatting Help

Don't worry about formatting, just type in the text and we'll take care of making sense of it. We will auto-convert links, and if you put asterisks around words we will make them bold.

Tips:

Create headers by underlining text with ==== or ----

To *italicise* text put one asterisk each side of the word

To **bold** text put two asterisks each side of the word

Embed images by entering: ![](https://www.google.co.uk/images/srpr/logo4w.png)That's the hard one: exclamation, square brackets and then the URL to the image in brackets.

* Create lists by starting lines with asterisks

1. Create numbered lists by starting lines with a number and a dot

> Quote text by starting lines with >

Mention another user by @username

For syntax highlighting, surround the code block with three backticks:

```
Your code goes here
```
Just like Github, a blank line must precede a code block.

If you upload more than 5 files we will display all attachments as thumbnails.