Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/PaulTR/AndroidThingsMCP3008ADC
Sample for communicating with the MCP3008 ADC
https://github.com/PaulTR/AndroidThingsMCP3008ADC
Last synced: about 2 months ago
JSON representation
Sample for communicating with the MCP3008 ADC
- Host: GitHub
- URL: https://github.com/PaulTR/AndroidThingsMCP3008ADC
- Owner: PaulTR
- License: apache-2.0
- Created: 2017-03-20T04:47:53.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-03-20T08:28:36.000Z (almost 8 years ago)
- Last Synced: 2024-10-04T15:38:44.016Z (3 months ago)
- Language: Java
- Size: 60.5 KB
- Stars: 15
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-android-things - MCP3008 - Sample to use MCP3008 Analog to Digital Converter (Useful links / Drivers)
- awesome-android-things - MCP3008 - Sample to use MCP3008 Analog to Digital Converter (Useful links / Drivers)
README
Paul Trebilcox-Ruiz
[email protected]Library for communicating with the MCP3008 Analog to Digital Converter.
Based on an Arduino library by: Uros Petrevski (https://github.com/nodesign/MCP3008)
Originally ported from Python code originaly written by Adafruit learning system for rPI:
http://learn.adafruit.com/send-raspberry-pi-data-to-cosm/python-scriptInitializing with a Raspberry Pi 3B and a TMP36 connected to ADC CH 0.
Pinout for sample like so:
ADC channel 0 -|* |- VIN
ADC channel 1 -| |- VIN
ADC channel 2 -| |- Analog GND (For this sample app, I used this ground)
ADC channel 3 -| |- Clock
ADC channel 4 -| |- MISO pin on board (sometimes listed as D-OUT on chip diagram)
ADC channel 5 -| |- MOSI pin on board (sometimes listed as DIN on chip diagram)
ADC channel 6 -| |- Chip select (CS)
ADC channel 7 -| |- Digital GND (For this sample app, I left this GND disconnected)While testing I wired BCM12 to CS, BCM21 to Clock, BCM16 to MOSI (D-OUT) and BCM20 to MISO (D-IN)
Can change pin numbers in your own projects to be the proper board pins.