Hardware Reference
In-Depth Information
Table 16-2 continue d
Key
Function
J
Start sending data from the Arduino
Home
Save the screen as a PNG ile
2
Data from pendulums 1 for X and 3 for Y
3
Data from pendulums 1 & 2 for X and 3 for Y
4
Data from pendulums 1 & 2 for X and 3 & 4 for Y
5
Data from pendulums 2 for X and 4 for Y
6
Data from pendulums 1 for X and 3 & 4 for Y
Using the Pendulum Pi
To inish of, here are a few notes on using the Pendulum Pi. To get a feel of what is going on,
start of with a simple two pendulum by pressing the 2 key. Now swing the two long pendu-
lums at positions 1 and 3 exactly together or as we say, “in phase”; you will see a diagonal line
at about 45 degrees being drawn. Now make them swing exactly opposed to each other -
that is, 180 degrees apart - and you will see the same diagonal line but drawn in the opposite
direction. Finally, get them at 90 degrees apart, let one go and release the second when the
irst is at the bottom of its swing. What you should then see is a circle. Of course you will not
get it exactly spot on so what you will actually see is an elongated ellipse instead of a straight
line and a fat ellipse instead of a circle. You might want to try some ine adjustment on the
pendulums' length to get them to swing exactly at the same rate. As the two drift out of
phase you will see the same shapes being traced slightly shifted. his is where it starts getting
interesting as pleasing patterns are built up.
Also as the swing decays, the excursions will get smaller, and the pattern being drawn will
slowly get smaller. his also adds interest to the pictures drawn. Now switch to a three pen-
dulum setup, and see how the second pendulum modiies the swing plotted. I have found it
best if you release the pendulums from a height rather than pushing them. Also, don't just
swing them the maximum amount they will go; often less is more. You will also ind some
energy is transferring from one pendulum to another, which also adds to the variety of pat-
terns you can get. here are many patterns you can generate from just one setup. Figure
16-20 shows some of the patterns I have managed to generate in a few sessions. To save a
picture, press the Home key on the keyboard. You will then be asked for a session name in
the Python console. Odds are you will have to click the console window to give it focus while
you type in the base name. After you have done this for the irst time any further screen
saves use the same ilename with an increasing number tacked on. hese are stored in a
folder called harmo , so make sure that you create one irst.
Search WWH ::




Custom Search