![]() Set values for what is considered FREE FALL (0-255)Īdxl.setFreeFallThreshold(7) // (5 - 9) recommended - 62.5mg per incrementĪdxl.setFreeFallDuration(30) // (20 - 70) recommended - 5ms per increment Set values for what is considered a TAP and what is a DOUBLE TAP (0-255)Īdxl.setTapThreshold(50) // 62.5 mg per incrementĪdxl.setTapDuration(15) // 625 μs per incrementĪdxl.setDoubleTapLatency(80) // 1.25 ms per incrementĪdxl.setDoubleTapWindow(200) // 1.25 ms per increment SPI pins on the ATMega328: 11, 12 and 13 as reference in SPI LibraryĪdxl.setActivityXYZ(1, 0, 0) // Set to activate movement detection in the axes "tActivityXYZ(X, Y, Z) " (1 = ON, 0 = OFF)Īdxl.setActivityThreshold(75) // 62.5mg per increment // Set activity // Inactivity thresholds (0-255)Īdxl.setInactivityXYZ(1, 0, 0) // Set to detect inactivity in all the axes "tInactivityXYZ(X, Y, Z) " (1 = ON, 0 = OFF)Īdxl.setInactivityThreshold(75) // 62.5mg per increment // Set inactivity // Inactivity thresholds (0-255)Īdxl.setTimeInactivity(10) // How many seconds of no activity is inactive?Īdxl.setTapDetectionOnXYZ(0, 0, 1) // Detect taps in the directions turned ON "tTapDetectionOnX(X, Y, Z) " (1 = ON, 0 = OFF) Higher Values = Wider Measurement RangeĪdxl.setSpiBit(0) // Configure the device to be in 4 wire SPI mode when set to '0' or 3 wire SPI mode when set to 1 ![]() Serial.println("SparkFun ADX元45 Accelerometer Hook Up Guide Example") Īdxl.setRangeSetting(16) // Give the range settings Serial.begin(115200) // Start the serial terminal * Comment Out The One You Are Not Using */ĪDX元45 adxl = ADX元45(10) // USE FOR SPI COMMUNICATION, ADX元45(CS_PIN)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |