Search found 2127 matches

by medelec35
Thu Jul 09, 2026 2:07 pm
Forum: Projects - Embedded
Topic: Potentiometer (6x buttons) on a 7-segment 74HC595 display
Replies: 7
Views: 243

Re: Potentiometer (6x buttons) on a 7-segment 74HC595 display

I'm glad its working even better for you now.
I did have a thought about simulation.
When I created the Potentiometer component, I added the option to display whatever type of read value is used.
E.g GetVoltage you will see the voltage value underneath.
option3.png
GetByte the 0 to 255 will be ...
by medelec35
Thu Jul 09, 2026 9:26 am
Forum: Projects - Embedded
Topic: Potentiometer (6x buttons) on a 7-segment 74HC595 display
Replies: 7
Views: 243

Re: Potentiometer (6x buttons) on a 7-segment 74HC595 display

You're welcome.
I'm glad your project is now working as expected.
You can also nest the decision branches and then in the final no branch will be accessed if all the condition are false.ts
Its the C equivalent to a chain of if / else if / else if / ... / else, rather than a series of separate if ...
by medelec35
Wed Jul 08, 2026 11:42 pm
Forum: Projects - Embedded
Topic: Potentiometer (6x buttons) on a 7-segment 74HC595 display
Replies: 7
Views: 243

Re: Potentiometer (6x buttons) on a 7-segment 74HC595 display

I have modified your project so voltage ranged can be detected.
I'm not sure why you want to show segments rather than digits but you know what you want lol.
by medelec35
Wed Jul 08, 2026 7:58 pm
Forum: Projects - Embedded
Topic: Potentiometer (6x buttons) on a 7-segment 74HC595 display
Replies: 7
Views: 243

Re: Potentiometer (6x buttons) on a 7-segment 74HC595 display

Hello.
GetVoltage requires a float variable, you have got it as an int.
Therefore Voltage will be ints only so no good if you want to check to say 2.3V
You will need to change the Voltage variable to a Float.
With the Decision branches, using just If:Voltage , then every time the voltage is 1V or ...
by medelec35
Wed Jul 08, 2026 2:58 pm
Forum: General
Topic: array size seems to be limited
Replies: 5
Views: 279

Re: array size seems to be limited

I have move this topic to a more appropriate section, as it is not a Flowcode bug.
by medelec35
Sun Jun 28, 2026 10:00 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 32
Views: 4055

Re: Using FVR on a adc channel

Hi Bob.
Think of a DMM.
With no resistance connected it won't show 0R as that is a short circuit, i.e very low value resistance.
With no test resistor present, but hardware should be OL (Over Limit).
What I would do with not test resistor then note ADC or result value.
Add a decision branch on under ...
by medelec35
Fri Jun 19, 2026 7:45 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 32
Views: 4055

Re: Using FVR on a adc channel

Hi Bob, not a problem.
I just fitted a 270R pullup and 150R Test resistor on my hardware, to try and replicate your setup.
This is the result at 4.5V VDD
R test1.png
The actual resistance of the test resistor is 150.6R
The R result is 149.1
Therefore the accuracy is 1.0%
Not bad at all for a ...
by medelec35
Thu Jun 18, 2026 7:21 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 32
Views: 4055

Re: Using FVR on a adc channel

Hi Bob.
Have you changed the PullupResistor value ?
With it being 267, it's working on my hardware and simulation.
This is the embedded UART results:
Hardware results Read 320.png
Calculation:
read 320 calculations.png
Simulation results:
read 320 simulation results.png

As you can see they ...
by medelec35
Wed Jun 17, 2026 11:45 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 32
Views: 4055

Re: Using FVR on a adc channel

Formula looks correct.
For a wider range the first ratiometric formula I gave would be best, but less accurate with a 10bit ADC.
There is not else that can be done.
Using R = PullUpResistor * FLOAT read / (1023.0 - FLOAT read)
can you let me know what the value of read is (sending it to your ...
by medelec35
Wed Jun 17, 2026 9:58 pm
Forum: General
Topic: Using FVR on a adc channel
Replies: 32
Views: 4055

Re: Using FVR on a adc channel

Hi Bob.
That is a lot better 3.2% instead of 39.2% that has improved by a factor of 10!
Is the voltage across the supply pins of the microcontroller exactly 5100.0 mV?
I used that in an example but if your chip supply is different you need to replace the 5100.0 with your exact VDD voltage.

To make ...