Comments: Python Programming Tutorial: Getting Started with the Raspberry Pi

Pages

Looking for answers to technical questions?

We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.

  • -------------------- Tech Support Tips/Troubleshooting/Common Issues --------------------

    Errata

    There was a small typo in experiment 4. The Python code shifted the bits too much on the temperature register:

    .
    .
    .
    temp_c = (val[0] << 4) | (val[1] >> 5)
    

    The correct number of bits that should be shifted is 4 bits:

    .
    .
    .
    temp_c = (val[0] << 4) | (val[1] >> 4)
    

    The example codes in Experiment 4 are now correct. I left the print out for anyone interesting in viewing the register before and after the bits are shifted. It's currently commented out with a #. Just remove it to view.

  • Member #898969 / about 5 years ago * / 0

    Nevermind. I figured it out.


If you've found an issue with this tutorial content, please send us your feedback!