User Tools

Site Tools


projects:blinker:work_logs:7_code

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
projects:blinker:work_logs:7_code [2022/02/28 12:55] tjhowseprojects:blinker:work_logs:7_code [2022/02/28 13:17] tjhowse
Line 63: Line 63:
 // Shut down ADC and timer0 // Shut down ADC and timer0
 PRR = 0b11; PRR = 0b11;
-</code+</code>
  
-The biggest power saving is putting the microcontroller to sleep between "frames" of the sequence.+The biggest power saving came from putting the microcontroller to sleep between "frames" of the sequence.
  
 <code c> <code c>
Line 89: Line 89:
 This approach reduced power consumption by the CPU and LED [[projects:blinker:work_logs:6_power_consumption_testing|by around 95%. ]] This approach reduced power consumption by the CPU and LED [[projects:blinker:work_logs:6_power_consumption_testing|by around 95%. ]]
  
-===== Video =====+==== Testing ====
  
-{{ youtube>WTbTDbBAby0?large }}+I don't (yet) know how to read Morse code, but I wanted to validate whether I was blinking out the message correctly, and looping around at the end. I wrote some [[https://github.com/tjhowse/blinker/blob/main/code/webcam.py|shockingly dodgy]] OpenCV code to watch the LED through a webcam and decode the Morse:
  
-===== Next Time =====+{{:projects:blinker:work_logs:pasted:20220228-130034.png}} 
 + 
 +It worked really well! I fed some [[https://en.wikipedia.org/wiki/Lorem_ipsum|Lorem ipsum]] into the sequence generator and slowed the blink interval down to 500ms. I ran it for a few hours and it validated that everything was working as it should. During this testing I measured the longest message I could fit onto the microcontroller alongside the code to display it: 
 + 
 +<code> 
 +lorem ipsum dolor sit amet  consectetur adipiscing elit  donec faucibus  orci  
 +quis iaculis volutpat  lacus mi sollicitudin sem  at dignissim turpis arcu nec  
 +est  fusce elementum vitae risus non aliquam  proin finibus arcu ullamcorper   
 +scelerisque orci egestas  varius mi  nulla bibendum eros sit amet leo  
 +pellentesque lobortis  curabitur a gravida mauris  ac tincidunt ex  phasellus  
 +sagittis congue massa  quis tincidunt felis  nunc et orci eget mi mollis viverra  
 +non in nunc  nullam dapibus pulvinar lectus  ut facilisis neque  vestibulum at  
 +tellus id enim posuere sagittis  nam tincidunt vel nulla eu tempor  abcdef  
 +qwerty asdfg zxcvb 
 +</code> 
 + 
 +===== Video =====
  
-I don't think there's much point in trying to further improve energy efficiency of the code. The next steps might be adding features like multiple message sequences, and/or improving the space efficiency to fit more/longer messages.+{{ youtube>PKivx9OP3eo?large }}
  
 [<6>] [<6>]
  
projects/blinker/work_logs/7_code.txt · Last modified: 2022/03/03 07:17 by tjhowse