Eisenscript ‘build’

The current project is a WebGL implementation of the eisenscript language. See documented progress on the dedicated page.

Current live

This page will serve as a todo list:

  • render in iframe
  • update iframe based on code entered
  • code highlighting
  • primitives in eisenscript rendered in three.js
  • eisenscript transformations preformed in three.js
  • local transformations
  • eisenscript lines
    • primitives: box, sphere, wireframe
    • single transform group
    • multiple transform group
  • eisenscript rules
    • rule order determined
  • beginner interactive tutorial to eisenscript
  • save and share scripts
  • share creations, watermarked/linked

eisenscript part 2

reverse engineering eisenscript, it’s the process. I am interested in parent-child relationships because that seems to be the way to get three.js to simply render the objects.

two transformations:

X first then RZ

in the x direction and then rotated

when there is two transformation sets it is the same

the box is transformed once in the x direction and then three times it is rotated

the box is moved three times in the x direction and rotated once

this acts the same as a rule if it is the the same order

RZ first then X

same

Eisenscript

“EisenScript is a programming language designed by Mikael Hvidtfeldt for generating 3d structures. This language shows you that even a simple system has a big possibility to generate surprising and complex structures, and then brings a big amazing to you.”

I tried modelling with this in structure synth and it’s great. My output did tweaking with MeshLab

 

Removing interior model faces:

1. Filters > Color Creation and Processing > Ambient Occlusion. Then applying default values worked for me.
2. Filters > Selection > Select by Vertex Quality. The small picture gave me some hint, Min quality: 0 Max quality: 0.1, the preview checkbox shows what you will select in red while you adjust.
3. Filters > Selection > Delete Selected Faces and Vertices.

Strain wave gear

Arduino MKR1000

Blynk app

DRV8825 stepper driver

Blynk can send and receive data to internet devices using it’s free app. You can also host your own Blynk server for security.

To send an adjustable frequency from the Arduino to the DRV8825 I used the tone command, a square wave is perfect.

The tone command:
tone(pin, frequency)
tone(pin, frequency, duration)

calling it with 2 parameters the frequency is output once, I want the frequency to output continually so there needs to be a duration, but the longer the duration the less responsive it is. Measuring the speed of the loop can be done with a set/clear with a state = !state, while including Blynk.

Sound LEDs

This is a graph of different bias voltages and the sensitivity of the module, mainly I learned, the potentiometer to one extreme or the other and you get nothing, and there isn’t much change with different bias, I have a 3.3V tolerant Arduino type micro so I picked ~1.5V I have a electret microphone module module and I want it to control the intensity of LEDs, ideally the louder the music, the more intense the light. The second part of that problem is when it is quieter, you want lower light. A wave is captured as an AC voltage so a loud sound has a larger wave, in positive and negative.

measured frequency response
measured specific frequency response

I started with a the voltage off the microphone sampled and controlling which lights are on and off in the strip. Louder means that there is more variation in the strip. I have ‘machine learning’ (if you call one variable learning) so that it would still change on quieter music with smaller changes.

 

http://dpeckett.com/beat-detection-on-the-arduino

Water detector

Water absence alarm.

Ingenuity from laziness, sounds like it could be protecting from huge amounts of water damage, and it could be. But, my dogs water runs low for an hour or two before we notice- perfect simple IoT project.

I built it. My dog water bowl sends an sms when it needs to be filled. I plan to make a proper guide. Used the Particle with power shield, and a IFTTT trigger to send an SMS. Very low power.

Archive of earlier ideas, possibly future work:

To detect absence of water, I’m thinking two wires that form a switch to ground, normally closed and you’d read 0 when there isn’t water you’d read 1, connected to an interrupt that can wake from sleep. How about a capacitive liquid level sensor, like the one I’d imagine is in the Pryme?

I’ll have to play with web hooks and see what integration will work, ideally something that alerts my phone. This could lead to integration to other things.

After a working prototype, there would be an effort to design something nice. The components I’ll use will be small already. How long power is provided should be alright with the interrupt, maybe instead of LiPo, I’ll use 4x 1.2V Eneloop batteries that would probably last longer and be safer.

This would be a good project for the Oaks I haven’t used. I got them not really knowing much, but know I know they were an early (at least when I got them) ESP8266 board. I’ve already worked with other Particle stuff so they use the same web IDE I’m used to.