Nice of the other team to leave you no documentation... I guess if I was stuck with 12 analog inputs and only 7 pins to read them on I would use something like a 74HC4051 to multiplex the inputs - use 3 gpio pins to control which of the 8 inputs is connected to the ADC on the BBB. Or use an MCP3426 (or similar) - a 4-channel ADC that you can talk to over I2C. Either way I think if you want to get 12 into 7, you're going to need another chip.
On 9 November 2013 15:37, Zain Dar <[email protected]> wrote: > Your right, I can hook up the analog sensors to the analog pins and read > them the normal way. The reason for analog is because when i was assigned > this project, it was already made by other teams who worked on it 2 years > ago. It's an R/D project from the college, but they haven't provided any > info on it from those days, except mentioning that the brace works and the > sensors are operational. I only had to order the BBB and make a program for > it to read those sensors in real time. I chose Python for the sake of > simplicity and i just learned how to make use of the board from it. Its no > problem for those asking out of curiosity, questions are welcome. > Now since there are 7 ADC pins on it, I have 12 wires for the Analog > sensors, each of them with X, Y and Z axis. I'm not sure how I can fit all > of them on the ADC. Is there a way I can use the GPIO pins for any extra > wires left over? if so, then how can i make use of them? in a loop, or a if > statement? > > On Saturday, November 9, 2013 5:09:23 AM UTC-5, Mike Bremford wrote: > >> If they're analog, surely you'd just hook them up to the analog pins and >> read them the normal way? Probably with a couple of resistors to reduce >> the voltage range to 1.8V? http://learn.adafruit. >> com/measuring-light-with-a-beaglebone-black?view=all >> >> Out of curiousity is there a reason you're using analog accelerometers? >> I'm far from a pro but I2C based ones like the ADXL345 are incredibly easy >> to use - two slave addresses possible, you have 2 I2C busses so that's 4 >> you can access - mix in a couple of other models (eg MMA7660) or hook them >> up via an I2C multiplexer and you can use 6. Digital is so much easier to >> work with, not least when it comes to running the wires - 4 (3V3, SCL, SDA, >> GND) is better than 4x3=12 for your analogs plus your 4 I2C wires for the >> others. >> >> >> On 8 November 2013 20:03, Zain Dar <[email protected]> wrote: >> >>> Well I was thinking of choosing python because of its ease of use for >>> pin manipulation and when I first got the beaglebone, I was setting up the >>> python library. I wasn't sure how to do it in other languages because I >>> don't have that much experience. As far as C++ is concerned, I do know a >>> little bit of it from college, but haven't continued learning it. >>> >>> >>> On Friday, November 8, 2013 2:08:46 PM UTC-5, don wrote: >>> >>>> On 11/08/2013 11:01 AM, Zain Dar wrote: >>>> >>>> A note to all those who see this post: *please do not be overwhelmed >>>> by the project!* it really is not that complicated when you think >>>> about it. Its just a regular knee brace with acccelerometers planted on it. >>>> I just need help on how to make a python code for reading the >>>> accelerometers on the gpio pins as well as the ADC pins. *They behave >>>> like sensors.* The Analog accelerometers have 3 connectors for the X, >>>> Y and Z dimension respectively and I'm looking for a way to make a code for >>>> reading those 3 dimensions in python. Any help is appreciated. >>>> >>>> On Monday, November 4, 2013 11:52:48 PM UTC-5, Zain Dar wrote: >>>>> >>>>> 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! >>>>> >>>> -- >>>> 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 [email protected]. >>>> >>>> For more options, visit https://groups.google.com/groups/opt_out. >>>> >>>> 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? >>>> http://chumbylab.blogspot.com/2012/04/reading-accelerometer- >>>> and-thus-i2c-from.html >>>> >>> -- >>> 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 [email protected]. >>> 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 [email protected]. > 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
