5 ms·
> All GPIOs can be configured to different functions including but not limited to SDIO, Audio, SPI, I2C, UART and PWM Does supporting audio mean that these GPI
by pedrocr 6y ago
> All GPIOs can be configured to different functions including but not limited to SDIO, Audio, SPI, I2C, UART and PWM
Does supporting audio mean that these GPIOs can be used as analog-to-digital converters? There are home automation applications where reading a voltage in an ethernet connected device is a good fit but from what I've seen in a raspberry that requires extra hardware connected to the IO ports.
- monocasa 6y agoIt probably means I2S.
- pedrocr 6y agoMakes sense. Just another digital bus. Bummer. https://en.wikipedia.org/wiki/I%C2%B2S https://en.wikipedia.org/wiki/I%C2%B2S
- monocasa 6y agoEh, a decent audio DAC pretty much requires another chip since it takes up a ton of die space, so you'd be an absolute fool to use the same process node as your logic. Since this looks to be beagleboard compatible, you should be able to use an audio cape like this https://www.element14.com/community/docs/DOC-67906/l/beaglebone-audio-cape https://www.element14.com/community/docs/DOC-67906/l/beagleb... If you don't care about it being decent, you can just use the PWM channels like the RPi does.
- pedrocr 6y agoI don't really want audio. What I'm looking for is to read 3.3V or 5V analog levels, with really low frequency, once a second or less would be fine.
- monocasa 6y agoIn that case you can probably hook up the GPIOs to a resistor ladder if you know the shape of the analog signal you're trying to sample.
- jononor 6y agoMany cheap and easy to interface I2C and SPI chips for that, which is the way the industry is going generally. Or throw in a tiny Arduino with stock Firmata firmware, and use that as an I/O extender.
- pedrocr 6y agoThat's the extra hardware I mentioned. I guess I wish the RPi just included one of those chips and had say 4 to 8 pins for ADC. It would make things simpler versus having to find something already well integrated or building it.
- Tyr42 6y agoThe solution I'm going for (for a similar problem, reading moisture from multiple plants on one esp8266) is tying the outputs from all the sensors together, and only turning on one at a time Like this guy: https://github.com/sfgabe/custom_scripts/blob/master/plant_monitor.ino https://github.com/sfgabe/custom_scripts/blob/master/plant_m...
- qchris 6y agoAs an aside, I really wish that these boards would include more than two PWM outputs. The Raspberry Pi has two as well, and it feels really limiting. Analog control instead gets farmed out to microcontrollers, when you could probably make it work with a single board if there were more pins to work with.
- Teknoman117 6y agoI used to love the beaglebone for that. Run application logic on the main arm core, farm the microcontroller stuff out to the embedded PRU microcontrollers (which could access all the IO functions). Still a single board solution.
- qchris 6y agoI agree-as far as I know, the BBB had something like 8 PWM channels. I'm not saying you need all of them, but at least 4 seems somewhat reasonable.
- Youden 6y agoI'm curious, what do you do with so many PWM outputs? I just play with electronics for side projects but stick to digital for everything, so I'm wondering what I'm missing out on.
- qchris 6y agoHonestly, I'm still mostly getting started in the area as well, but I'm looking to use them for motor control. An example of this would be this paper [1], which I'm hoping to replicate to some degree, but requires at least 4 PWM outputs. I'm currently planning on using an Odroid-C4, which has 6 PWM outputs. But the work I've needed to put into that in order to get a motor controller working was way more than I needed than for a RPi4b, since libraries for it already exist for the Pi vs needing to re-write them for the Odroid board. It would have been cool to try it with an open-hardware board as well. But it's not just quadcopters--a lot of other projects like rovers or position control with multiple stepper on different axes benefit from extra PWM, and doing it in software can lead to too much jitter, so the hardware timers are necessary. [1] https://www.diva-portal.org/smash/get/diva2:946992/FULLTEXT02 https://www.diva-portal.org/smash/get/diva2:946992/FULLTEXT0...