Arduino code hulp

is it possible to create for me and arduino code that runs as follows.
every 10 percent a led lights up and this to 100 percent

Sure it's possible. How much are you paying for someone to do your work?

Jeez. Could you have provided any less information?

The answer is most likely "yes" but you're going to have to be much clearer about what, exactly, you're doing, what the input(s) are, what the output(s) are, which variety of Arduino you're thinking of using etc.

1 Like

Don't you think you should work on your thesis on your own?

Or at least come up with your try?

"I want to write some code for my arduino. Can somebody write it for me?"

@st4venn I think you are going to need 10 LEDs. Does this help?

You will need some way to measure the amount of water in your cistern. Maybe an absolute liquid pressure transducer would work. The pressure goes up with the height of the water column.

You would need a way to know the fluid level. you could use a tilt switch with a float to tell Arduino the container is full. You may be able to find a submersible sensor that can detect the level of water. I think the easiest way to would be to measure the weight then do the math to figure out at what weight the volume is 10% by dividing the full weight by 10. Then get a component to measure the weight to connect to Arduino. For the LEDs you could use a strip of 10 WS2812b which are individually addressable. If you use a non segmented diffuser the colors would look blended together. A segmented diffuser would show the ten individual LEDs.

Wouldn't the transducer require a fully sealed container at all times

Why? The pressure at the bottom of a full container is higher than the pressure at the bottom of a less-full container. Were not measuring air pressure.

If your cistern rests on a fairly level surface you could use several load cells to measure the weight of the container and its contents.