Code Tinker Hack

Friday, July 28, 2017

Hey there! Spent sometime using OpenScad - 3d design tool. All 3d objects designed programmatically. It was a bit of a pain. I'll probably stick with something as Autodesk Fusion 360 in the future.

The advantage of OpenScad is that you can parametarize your 3d model. For example Trellis box has number of buttons parametirized: you can easily change from 4x4 to 8x4 or 8x8 or other... It as well has height, thickness, etc parameterized. It means that adjusting the model size should be quite easy.

You can use OpenScad to export design into STL and 3d print it.

Below is the screen capture from OpenScad for Trellis 3d model. It as well available at github link.

And here is one of the earlier version print out combined with trellis:

Monday, July 24, 2017

A bit disapointed by the Trellis requirement to have delay (30) ms in the Arduino loop (default is 30, it worked on 25ms setting). Apparently Trellis is using HT16K33 that in order to scan 39 key matrics (even Trellis exposing 16 keys) according to specs requires 20ms to complete the whole internal scan loop. The delay may be noticable in applications that require faster response than 20ms e.g. music instruments or gaming controllers.

Sunday, November 27, 2016

That is probably by far the best heapdump analyser tool I've ever used. It provides immediate suggestions to problem but as well allows to drill into details of heap and navigate object tree. Understand how much memory data structure utilise.

There are number of good articles on the subject. One of the good intro articles here.

I've found that I had to run tool with increased memory on Mac in order to open large heaps. To run it on Mac with extended memory (below is 6Gb) execute following command:

Wednesday, January 1, 2014

Thought of sharing a relatively simple gist of Retry akka pattern I came up recently. It could be useful in case Client actor sends request to another Service provider actor and request may have to be retried due to different reasons (network failure in distributed environment, service down or other...). To increase resilience Client attempts to re-try operation until either response is received or after number of retries exceeded Client simply gives up.

The pattern is quite generic and I thought it would be cool to have a pluggable re-tries for akka actors.

Wednesday, December 4, 2013

Hi folks.... Been a long time since I've promised to write a post on how to build 64 keys midi keyboard. In fact this post will be on what needs to be done to extend the original post where we built midi keyboard from 32 key piano toy. In this case, of course, you will require a toy with more keys... I have not seen much of the toy pianos with 64 keys (have you?) but I guess you could build a matrix from scratch yourself using push buttons (that is fun!)

I also needed of course to have a client side Game engine that would allow me to concentrate on actual game implementation and handle rest of the stuff as Sprites, Animations, Collisions, Sound... And after some research I've found Carfty.

5) So Crafty it was...

I would not be discussing the advantages of technologies but will try to explain how I've used every of those technologies. Obviously some of the components were used more and some less. But all were necessary to put this thing together.