stanleyella
 Guru
 Joined: 25/06/2022 Location: United KingdomPosts: 2681 |
| Posted: 01:44am 26 Aug 2022 |
Copy link to clipboard |
 Print this post |
|
Just experimenting with a-d. This was after using the gauge graphics. I have a wave generator but must protect the 3.3V max in on gpio. https://youtu.be/0yDZQDpXL1M easyOPTION BASE 0 ' 0 based arrays OPTION EXPLICIT dim count% dim myvoltage! Dim samples!(237) Dim old_samples!(237) 'colour shortcuts const WH =RGB(255, 255, 255) 'WHITE const YE =RGB(255, 255, 0) 'YELLOW const LI =RGB(255, 128, 255) 'LILAC const BR =RGB(255, 128, 0) 'BROWN const FU =RGB(255, 64, 255) 'FUCHSIA const RU =RGB(255, 64, 0) 'RUST const MA =RGB(255, 0, 255) 'MAGENTA const RE =RGB(255, 0, 0) 'RED const CY =RGB(0, 255, 255) 'CYAN const GR =RGB(0, 255, 0) 'GREEN const CE =RGB(0, 128, 255) 'CERULEAN const MI =RGB(0, 128, 0) 'MIDGREEN const CO =RGB(0, 64, 255) 'COBALT const MY =RGB(0, 64, 0) 'MYRTLE const BL =RGB(0, 0, 255) 'BLUE const Bk =RGB(0, 0, 0) 'BLACK const Gy =RGB(128, 128, 128) 'GREY const Lg =RGB(210, 210, 210) 'LITEGREY const Og =RGB(255, 165, 0) 'ORANGE const PK =RGB(255, 160, 171) 'PINK const Gd =RGB(255, 215, 0) 'GOLD const SA =RGB(250, 128, 114) 'SALMON const BE =RGB(245, 245, 220) 'BEIGE ' SETPIN GP26, AIN cls for count%=0 to 237 samples!(count%)=(PIN(GP26)*50)+140 'get new samples old_samples!(count%)=samples!(count%) 'copy samples to old_samples line count%,samples!(count%),count%+1,samples!(count%)+1,1,wh 'draw first samples next count% ' do for count%=0 to 237 samples!(count%)=(PIN(GP26)*50)+140 'get new samples line count%,old_samples!(count%),count%+1,old_samples!(count%)+1,1,bk 'erase last samples line count%,samples!(count%),count%+1,samples!(count%)+1,1,wh 'draw new samples old_samples!(count%)=samples!(count%) 'copy new samples to last samples next count% loop
Thanks for the colours. |