Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 14:42 21 Nov 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Testing a-d

Author Message
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 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
easy
OPTION 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.
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9757
Posted: 07:11am 26 Aug 2022
Copy link to clipboard 
Print this post

Would love to look at your video, but YouTube won't let me.
Says it is private, which it probably is.
If you could make it public and reshare the link, I'd like to see your wee video.
Smoke makes things work. When the smoke gets out, it stops!
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2681
Posted: 03:06pm 26 Aug 2022
Copy link to clipboard 
Print this post

  Grogster said  Would love to look at your video, but YouTube won't let me.
Says it is private, which it probably is.
If you could make it public and reshare the link, I'd like to see your wee video.

oops, It was not published. Try https://youtu.be/cVlZn1JXYHk
It just shows noise or mains hum.
The pico runs from 3.3V but watch the display when the usb programming lead is removed.
It was late at night when I coded it. My first attempt I just drew the samples and used CLS. It's just a bit of fun, not a scope yet.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025