tag:blogger.com,1999:blog-427527960386608258.post8704347332199507065..comments2023-11-10T00:26:56.698-08:00Comments on Yet Another Arduino Blog: Display two digits numbers on the Raspberry PI Sense HATBrunohttp://www.blogger.com/profile/13748160755424198810noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-427527960386608258.post-32333529997022499832018-09-28T02:23:11.182-07:002018-09-28T02:23:11.182-07:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/03176049272713423598noreply@blogger.comtag:blogger.com,1999:blog-427527960386608258.post-62197726441835754132018-03-22T05:49:18.709-07:002018-03-22T05:49:18.709-07:00the python scrip just scrolls from 1 to 100 and do...the python scrip just scrolls from 1 to 100 and doesn't seem to show the actual temperature??Anonymoushttps://www.blogger.com/profile/00610440200338244042noreply@blogger.comtag:blogger.com,1999:blog-427527960386608258.post-38246726221469746512017-10-28T04:30:10.847-07:002017-10-28T04:30:10.847-07:00Displays digits in 3x5 grid
OFFSET_LEFT and OFF_SE...Displays digits in 3x5 grid<br />OFFSET_LEFT and OFF_SET_TOP provide padding to centre on 8x8 grid<br /><br />Each digit 0-9 is represented in NUM list as 15 bits - a stack of five 3 bit sets<br />Zero is 111, 101, 101, 101, 111<br />Five is 111, 100, 111 001, 111<br /><br />If you stack e.g five and replace the 0s with spaces, you get<br />111<br />1 <br />111<br /> 1<br />111<br /><br />def show_digit is responsible for drawing a single digit<br />- offset finds where this digit starts in NUMS list<br />- the for loop provides an index into NUMs for each of the 15 required bits<br />- xt/yt find the x/y position to plot this digit<br />- set_pixel plots the digit at the offsetted x/y position<br />- the r/g/b*NUMS[p] trick results in a zero or the selected colour<br /><br />def_show_number is responsible for showing both digits<br />- the first digit is plotted according to OFFSET_LEFT, OFFSET_RIGHT<br />- the second digit is plotted 4 points to the right of that<br />Anonymoushttps://www.blogger.com/profile/10631849269596313830noreply@blogger.comtag:blogger.com,1999:blog-427527960386608258.post-34126572444281503172017-05-04T04:00:44.783-07:002017-05-04T04:00:44.783-07:00New to the rpi and python. I'm at a loss as to...New to the rpi and python. I'm at a loss as to how this is writing the numbers via the loop in show_digit and how NUMS is used. Any chance of some pseudocode to help in understanding?mrFloppyhttps://www.blogger.com/profile/13654433850725366772noreply@blogger.comtag:blogger.com,1999:blog-427527960386608258.post-18609993023920393992017-05-04T04:00:04.412-07:002017-05-04T04:00:04.412-07:00This comment has been removed by the author.mrFloppyhttps://www.blogger.com/profile/13654433850725366772noreply@blogger.comtag:blogger.com,1999:blog-427527960386608258.post-13143593549025242942017-01-24T10:29:25.747-08:002017-01-24T10:29:25.747-08:00This is amazing! Thank you so much for creating th...This is amazing! Thank you so much for creating this. I was spinning my wheels for a little while trying to come up with my own solution but this looks great!<br /><br />Thanks again!<br />DwayneAnonymoushttps://www.blogger.com/profile/09453018616825576989noreply@blogger.com