--Maybe this will help some. I am not a big python guy so dont have code to share. Why did you choose python over other languages?
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/Rkhvpaf8HHc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/Rkhvpaf8HHc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
If you're looking for something quick & easy, try Sparkfun's Analog/Digital MUX Breakout at https://www.sparkfun.com/products/9056 . I haven't used it myself but it looks like something that could get you going quickly. Just don't forget the BBB's analog input voltage limit of 1.8v.!
--
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/Rkhvpaf8HHc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/Rkhvpaf8HHc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
Hello, I'm working on a college project and my task is to develop a software code for a knee brace, that has 6 accelerometers planted on the frame (4 Analog Accelerometers and 2 Digital Accelerometers). The Analog accelerometers have 3 axis of dimensions, X, Y, & Z, whereas the Digital accelerometers have two interrupts (INT0 and INT1), an SDA, an SCL, a 3.3V ref and a GND. I need to program the BBB to turn on the designated pins on the expansion slots for the ref voltage (P8 & P9 respectively), and for the reading of the accelerometers on the computer screen. After that I need to store the data from the accelerometers to an SD card. The main issue for this is that I'm not very good at programming, especially for the BBB since I haven't worked on it before, so is there any examples or tutorials on how I can make the software code from scratch or by putting different kinds of code together to make it work? Or is there any one who knows how to turn on any pin on the BBB and read the accelerometers from the expansion slots? I appreciate anyone who helps me out on this as it is a challenging step for me in. Any advice is appreciated,Thank you!
--
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/Rkhvpaf8HHc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "BeagleBoard" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/beagleboard/Rkhvpaf8HHc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to beagleboard...@googlegroups.com.
import smbusimport time
def main():bus = smbus.SMBus(1)# Power-on the accelerometer, enabling only the z-axisbus.write_byte_data(0x18, 0x20, 0x24)try:while True:# get z-axis accelerationtilt = bus.read_byte_data(0x18, 0x2D)# if it's supposed to be negativeif tilt > 127:# then convert it to the absolute value of the negative valuetilt = 256 + ~tiltpositive = Falseelse:positive = True# format and print itpos = tilt / 2print str(tilt).rjust(6),if positive:print 65*' ' + '|' + (pos*'#').ljust(65)else:print (pos*'#').rjust(65) + '|' + 65*' '# sleeptime.sleep(0.1)except KeyboardInterrupt:# restore default settingsbus.write_byte_data(0x18, 0x20, 0x07)if __name__ == '__main__':main()
I haven't tested it yet because the brace is currently with my team partner. I had some idea from a youtube video of someone testing their accelerometer with a raspberry pi. It was working and the person uploaded the code.
That code actually works with the ADXL345? You've tested it and it gives the right result?
--
I wouldn't try testing with that code - I found it here, and by the looks of the commenting it is meant to work with a LSM303DLH, not a ADXL345. I found this, however, which looks like demo code for the device you have, although it is written for Arduino and not in Python but it should get you on the right path.
--
Have you seen this library?
--