4. Embedded programming
This week we searched programming Barduino.
Documentation
Datasheet search
- For programing one of the most important information is pin information, atleast to understand which pins are analog / digital. Will use SAMD11C.
- Processor:
- ARM Cortex-M0+ CPU running at up to 48MHz.
- Single-cycle hardware multiplier
- Micro Trace Buffer
- Memories:
- 16KB in-system self-programmable Flash
- KB SRAM Memor
Programing
- Desided to use Programmer-SWD-D11C, because was sure that will manage soldering. First tested controller by blink code.
- Compose board with RGB LED, coded to blink each of three color with one second delay.
- Tried switch white light, but probably same internal pins resistance (different light diodes need different resistance) hence different count of light.
- Programed two diodes to switch on if brightness of environment will be lower than some value (but without mapping it does not have sence for sensitive control). Looks like it was not working at all.
- Few another variations did not give result.
- Last one worked.
- When I understood that there is "map", function linking sensor data numerical interpritation to 256 interval (2^5 / range 0-255)? but for some reason it did not work, so decided to move further and try to interact two light sources by button.
- After continious strugling with one button, decided to use two buttons (symbolising different sensors for further UX stucture), after even more strugling it gave result, one button on/off, another changing modes of light (switch on both, or just one).