Otherwise, your program may behave unpredictably - many IC chips has volatile memory! Single tap, double tap, free fall events detection: Important: in case of using modules like GY-80 (with multiple sensors) be sure that ADX元45 object is initializing as the first one.
To change that pin in Config.h file, set ADX元45_VCC_PIN define to appropriate: #define ADX元45_VCC_PIN 52 Then in case of initialization error, the library will be setting power on/off trying to restart the device. Instead of connecting the device VCC pin to 3.3V or 5V, it can be connected to one of the output pins. The ADX元45 class constructor accepts as one of the arguments the deviceVCCPin. unplug and plug the device (USB cable) from power,.This will be revealed by this: 354 I repeat the initialization of ADX元45 for the: 0 timeħ01 I repeat the initialization of ADX元45 for the: 1 time Sometimes there is a problem with initialization (getting device ID, basically any information from the chip).
Important: be sure that you are able to type specific key in Serial Monitor. Then follow the instructions from Serial Monitor. Or Press '1' key and Enter to finish! and get compensation parameters You should see something like that on Serial Monitor (baudrate = 115200): 2 Serial initialized with baudrate = 115200ġ04Ěnd then press key for example '3' when ready and press Enter.ġ04. In order to enable callibration in ADX元45.cpp file change ADX元45_ENABLE_CALIBRATION_PROCESS define to 0x01: #define ADX元45_ENABLE_CALIBRATION_PROCESSĐx01 In other words, to get the best accuracy, you need to calibrate it. Callibration process:ĭue to manufacturing process, accelerometers have some problems with the data quality. tDataRate(->your_settingyour_setting<-) Īs it was mentioned, the user has access to advanced options. To change above in ADX元45_Project.ino file uncommend and choose appropriate in below: // Set your Data Rate and Range or use defaults from ADX元45::init() #define PRINT_EVENTS 0x01 // 0x01 = Enable Other = Disable To see events change defines in ADX元45_Project.ino file to: #define PRINT_DATA 0x00 // 0x01 = Enable Other = Disable
To see a real-life example open AS7 project file ADX元45_Project.atsln and upload it ( ADX元45_Project.ino) to a micro-controller. **The Due MCU cannot be exposed to the voltage above 3.3V level! Example *If your ADX元45 board uses 5V or 3.3V and your MCU work on the similar voltage level (Due - 3.3V, Uno - 5V) this library provide you the possibility of restarting ADX元45 IC, see Callibration process below.
The working example for this library is writen in Atmel Studio 7 with Visual Micro addon. The library also uses Status Class which is optional. Library uses I2C Interface, I2C Sensor Interface to simplify and unify working with I2C devices. However, if there is such a need, the user has the possibility of advanced configuration and use of the library. The library is intended to work without any user interference, just open project and upload working example and use it.
Comes with 9 pin 0.1" standard header in case you want to use it with a breadboard or perfboard. The VCC takes up to 5V in and regulates it to 3.3V with an output pin.įully assembled and tested. The ADX元45 is the latest and greatest from Analog Devices, known for their exceptional quality MEMS devices. The lower range gives more resolution for slow movements, the higher range is good for high speed tracking. You can set the sensitivity level to either +-2g, +-4g, +-8g or +-16g. The sensor has three axes of measurements, X Y Z, and pins that can be used either as I2C or SPI digital interfacing. We added an on-board 3.3V regulator and logic-level shifting circuitry, making it a perfect choice for interfacing with any 3V or 5V microcontroller such as the Arduino. Filling out our accelerometer offerings, we now have the really lovely digital ADX元45 from Analog Devices, a triple-axis accelerometer with digital I2C and SPI interface breakout.