Absolute final code for the crystallise installation
Mosaic simulator in C++, used to simulate Arduino code (with minimal modification) to see results without actual hardware present.
Make a copy of main.cpp and name it to reflect the pattern it tests.
Only insert code into the "Code to simulate" sections (one for multithreaded code, and another for singlethreaded code, marked out clearly) in {your main}.cpp, run/compile using ./compile_run {your main.cpp} (optionally just run with ./run), where {your main.cpp} is an argument taken in.
Use "disp.wait({nanoseconds})" to control the speed of your animation.
Terminal outputs fps information. Dynamic performance adjustments are disabled (very broken and unnecessary).
Copy Template.bmp and paste into your preferred image editor, and colour in the appropriate panels. When done, run:
./compile_run yourImage.bmp
replacing yourImage.bmp with whatever you named the image containing your pattern. Some text will then be outputted to the command line, along with the same text into a file called yourImage.bmp (or whatever you named your image).
This text is what the code for the controller uses to create the pattern (and the simulator). Verify that it all works by loading it into the simulator.
Format of output text: {{R0,G0,B0},{R1,G1,B1}, ... {RN,GN,BN}}; where Rn is how much red should be in crystal n, Gn is how much green should be in crystal n, and Bn is how much blue should be in crystal n.
These values range from 0 to 255.
NOTE: .bmp files must be in 24-bit format, do not overwrite colour space information when saving your image from the provided Template.bmp
Copy Template.bmp and paste into your preferred image editor, and colour in the appropriate panels. When done, run:
./compile_run yourImage.bmp
replacing yourImage.bmp with whatever you named the image containing your pattern. Some text will then be outputted to the command line, along with the same text into a file called yourImage.bmp (or whatever you named your image).
This text is what the code for the controller uses to create the pattern (and the simulator). Verify that it all works by loading it into the simulator.
Format of output text: {{id1 of crystal in wing},{id2 of crystal in wing}, ... {idN of crystal in wing}};
There is also a reciprocate file (of crystals NOT in wing generated).
These output both to file, and to command line.
NOTE: .bmp files must be in 24-bit format, do not overwrite colour space information when saving your image from the provided Template.bmp
Running light patterns for arduino and led
Graphing library in C
Graphing library in C++, used for microcontroller