Time to test my musical chops, this time with the Keyboard Instrument:
Unlike what you might expect - each button being connected to the arduino via it’s own pin, allowing it to trigger the different notes - instead they’re all plugged into a single pin, but send different amounts of voltage based on which resistors are in serial. The arduino then reads the voltage being supplied, and plays the relevant note via a simple conditional.
Now, (at the risk of being told off my @Woo again), this also had a bit of an issue with it, as the book mentions that pressing two buttons at the same time should produce a unique amount of resistance based on the relationship between the two resistors in parallel - this didn’t happen… instead what I got is what I was expecting: for the path of least resistance to be populated with power…
… although I gather that it’s probably me that’s wrong here, but right now I’m not sure what I can do to correct for this.