Trick for scaling in embedded processors

Suppose you have an ADC signal e.g 12-bit value that needs to be scaled. If your processor is for instance an 8-bit AVR and/or you have few cycles to waste on scaling you cannot afford using floating point arithmetic and not even division. Often the following scheme can be used with sufficient accuracy: Suppose itContinue reading “Trick for scaling in embedded processors”

Fun with Factor and cellular automata

As a follow up on my last post – I created a Github repository for code that can be used to visualise cellular automata in Factor (using OpenGl). https://github.com/lonelab/cellularautomata Just copy the contents into the factor source tree under work/cellular and you should be able to run it the usual way… (see http://www.factorcode.org) Then picturesContinue reading “Fun with Factor and cellular automata”