Arrakis 2.0 update - the best (?) possible UI

In the interest of minimizing effort (and the possibility of mistakes, bad wifi, etc.) when I’m displaying the Arrakis 2.0 at makerfaires, etc., I’ve been using a macro file that automatically runs a sequence of patterns without any user input, except the power switch. The macro ran the same sequence every time the machine was powered up because I specified pattern file names like this:

; file name: 215_patterns
M98 P"/gcodes/_wipe_4mm_lines_15.gcode" ; erase the table
M98 P"/gcodes/231204_01_6000_30000.gcode" ; draw a pattern
G04 S60 ; delay 60 seconds
M98 P"/gcodes/_wipe_LL_4mm_circle.gcode"
M98 P"/gcodes/231225_01_6000_30000.gcode"
G04 S60
M98 P"/gcodes/_wipe_L_4mm_circle.gcode"
M98 P"/gcodes/240427_01_6000_30000.gcode"
G04 S60
M98 P"/gcodes/_wipe_R_4mm_circle.gcode"
M98 P"/gcodes/091721_02_18000_60000.gcode"
G04 S60

I was recently made aware of some updates (made long ago!) to the firmware in the Duet2 WiFi controller board I used in Arrakis 2.0. The firmware includes conditional and looping constructs, and a random function using the CPU clock ticks as a seed. With some help from the RepRap Firmware author, I figured out how to run a random sequence that is different every time the machine is powered up.

I now store drawing pattern files in a folder on the uSD card on the Duet2 WiFi controller like this:
/gcodes/draw/0.gcode, /gcodes/draw/1.gcode, /gcodes/draw/2.gcode, … /gcodes/draw/224.gcode

and I store erase patterns in a separate folder like this:
/gcodes/wipe/0.gcode, /gcodes/wipe/1.gcode, /gcodes/wipe/2.gcode, … /gcodes/wipe/22.gcode

The random function, invoked like “random(225)”, returns a random integer between 0 and 225-1=224.

The new macro looks like this:

M98 P{“/gcodes/wipe/”^random(23)^“.gcode”}; erase the table
M98 P{“/gcodes/draw/”^random(225)^“.gcode”}; draw a pattern
G04 S60 ; delay 60 seconds
M98 P{“/gcodes/wipe/”^random(23)^“.gcode”}
M98 P{“/gcodes/draw/”^random(225)^“.gcode”}
G04 S60
etc.

The sequence of erase and drawing patterns is different every time the machine is powered on!

I haven’t put the statements into a loop yet because I can just copy and paste them a few times and end up with a sequence that will run for weeks without interruption. But, if I add or remove either wipe or drawing patterns, I’ll have to edit all those statements to account for the new file numbers, so I’m going to add a loop to generate a random number between 0 and 999 with a conditional test to see if the file exists. If not, try again, and if it does, use it to draw or erase the table. That way I’ll be able to add or remove pattern and wipe files without having to edit the macro at all.

2 Likes

225! That is a lot of patterns!

What maker faires do you take it to?

Having it just draw when you power it on is crucial for these shows. We had a power strip we could trigger with our shoes and we could flip it while talking to people.

I’ve been generating patterns for this table for a few years…I’m starting to work on Arrakis 3.0 that will be a little smaller than Arrakis 2.0. I don’t want all those patterns to go to waste, so I’m going to write a Perl program to scale the existing pattern files to any specified size.

So far Arrakis 2.0 has been shown mostly in the Milwaukee area. There’s a Mini Makerfaire in Burlington that I skipped this year, but will probably take it to next year. And every year we have Bay View Gallery Night and Doors Open Milwaukee, so I take it to the Makerspace for those. Arrakis 2.0 is currently on loan to my brother’s distillery tasting room where it has been very popular. One of these years I may take it to the Midwest RepRap Festival.

I have a lighted foot switch on the power cord for the table. I took it to the Milwaukee Makerfaire a couple years ago and figured some kid would see the light on the switch and stomp on it. No one did until shortly before closing on the last day. A woman with 4 kids in tow came up to the table and right after telling the kids to look but don’t touch, she stepped on the power switch. When I got home I 3D printed a cover for the switch.

I like being able to just set up the table and let it run. If I can’t be around the table I know it will just keep going. Sometimes other people from the makerspace go to the table to talk to people about it, so it’s super easy to tell them if the table does anything weird, just cycle power. Prior to having the random sequences working, I used to put in a pattern that would run at the end of the macro file saying “That’s all folks! Cycle power to restart”.

I’m actually surprised at the table’s reliability. It’s been running all night, 5 nights a week, at the tasting room for months and hasn’t had any problems. And so far, no one has spilled a drink on it!

2 Likes