LED motion counter with randomized numbers

Hello everyone,
(First project, super beginner) I would like to build a motion counter with a display, but instead of counting movements in a proper order I want it to assign a random number from 1 to 333 for each motion.

I found these tutorials which I want to follow.

Would be super grateful for help!

Hello
Post your current sketch, well formated, with comments and in so called code tags "</>" to see how we can help.

An "Up Counter" is not suitable if you want random numbers to appear. An Up Counter does what it says: counts up by 1 each time it receives a signal. I would recommend a display module based on TM1637 or MAX7219 chips.

s-l225

What movements do you want to detect? You should understand that PIR sensors can only detect the movements of warm bodies like humans and animals. Not useful for detecting movement of other objects. I'm not sure the author of that tutorial you linked to understands that, they seem to be a beginner, judging by the code they present.

Hi,
Welcome to the forum.

Google;

arduino random numbers

Have a look at this link.
https://www.arduino.cc/en/pmwiki.php?n=Reference/Random

Tom... :smiley: :+1: :coffee: :australia:

You can't quite win, can you?

The first tutorial is OK, but contains an old blunder concerning the wiring of the contrast potentiometer and with comments closed, that cannot be corrected. Not critical, but slightly inconvenient. It shows a very old version of the 1602 display, not the one presently available, but again, not a critical problem. In many details, a good explanation.

The YouTube tutorial shows in nauseating detail, an effective but inconvenient display design using obsolete ICs. Either the 1602 LCD(, preferably a version with backpack and using the proper HD44780 library) or PaulRB's suggestion would be far more sensible. :grin:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.