Magnetic Bit Reader

This magnetic bit reader uses the PCF8574 I2C I/O chip and four reed switches. Reading the value of the PCF8574 will tell you which of the four reed switches has been activated by a magnet. I only had four reed switches – so the sensor has 16 combinations – using all eight pins on the PCF8574 will give you 256 combinations. The circuit for the sensor is shown below.

In the video you will hear the NXT saying numbers between 0 and 10 based on the input from the sensor. The program is written in NXC and includes easy to use functions to read and write to the PCF8574 chip. The program uses a set of sounds files which can also be downloaded. Be sure to check out Sivan Toledo’s websiteand The Extreme NXT website and book for more info on NXT I2C interfacing.

Pictures

One comment on “Magnetic Bit Reader
  1. Author Image google_user says:

    Cooooooooooooooooooooooooooooooooooooooooooooooooooooo

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Make a donation

Download

NXC Program578 downloads

NXC Sound Files536 downloads