2019-05-30 (Th) Electronic Wind Chimes EWC

Defining and calculating the probability of prandom number sets yesterday was the necessary step before coding the device. The first implementation took the exclusive nature of Arduino random() function into account, but the graphing technique was warped.

Listening to the notes produced by center-weighted prandom numbers was not enough to determine if they were clustering around the median value so print statements were added which would show an "X" between two bars. The position of the X was based on the generated number. It was possible to see that an even distribution, as shown on the left, had wildly varying positions from both sides of the scale while the right side, which was recorded during the most aggressive weighting, kept the numbers in a tighter formation.
Left values: even distribution
Right values: aggressive center-weighting

After the clunky graphing, I remembered that Arduino included a built-in plotting function. For the first half of the time, I plotted points using even distribution, and during the second half, I relied on the aggressive center-weighting. It should be evident that the numbers fall in line on the right side of the plot below.
Left half: even distribution
Right half: aggressive center-weighting


First time here?

Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5

Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com




