This is a demo project for the Pmod CMPS2 made by Digilent. The X, Y and Z components of Earth's magnetic field are measured, converted in mG (milliGauss) and displayed on the Serial monitor. The module of the components and the angle of the device is also calculated and displayed (calculations are made according to the Pmod's datasheet). To control the Pmod, an Arduino UNO is used, which also sends the data to the computer. To communicate with the peripheral device, I2C communication protocol is used, the device address is 0x30. Data is recieved as two 8-bit parts of a 16-bit number in two's complement form.
Using the Pmod CMPS2 with Arduino Uno
Application notes for Pmod CMPS2 and Arduino Uno. The 3 components of the magnetic field, module, & angle are displayed in serial monitor
Thanks to Lextronics.
Comments