Search found 6 matches
- Wed Apr 13, 2016 9:59 am
- Forum: MicroPython pyboard
- Topic: ADXL345 with Pyboard
- Replies: 14
- Views: 23316
Re: Interfacing Sparkfun ADXL345 with Pyboard.
Hi all, With some reference and modicafication, I think I got the driver for ADXL345 for the pyboard. can some one help me, how to to log the data of x,y,z axes to a text file. for this code. from pyb import Pin from pyb import SPI READWRITE_CMD = const(0x80) MULTIPLEBYTE_CMD = const(0x40) DEVID_ADD...
- Wed Apr 13, 2016 9:05 am
- Forum: MicroPython pyboard
- Topic: ADXL345 with Pyboard
- Replies: 14
- Views: 23316
Re: Interfacing Sparkfun ADXL345 with Pyboard.
Hi Turbinenreiter,
Thanks for the info, but my application itself is to design a data logger for higher output sample rate. So I must go with SPI.
Regards,
Abhi
Thanks for the info, but my application itself is to design a data logger for higher output sample rate. So I must go with SPI.
Regards,
Abhi
- Tue Apr 12, 2016 9:37 am
- Forum: MicroPython pyboard
- Topic: ADXL345 with Pyboard
- Replies: 14
- Views: 23316
Re: Interfacing Sparkfun ADXL345 with Pyboard.
Hello, Can someone help me how to read the x,y,z offsets through spi in Micropython. Here is the corresponding python code. xoffset = spi.xfer2([30 | 128,0]) yoffset = spi.xfer2([31 | 128,0]) zoffset = spi.xfer2([32 | 128,0]) # Initialize the ADXL345 def initadxl345(): # Enter power saving state spi...
- Mon Apr 11, 2016 12:10 pm
- Forum: MicroPython pyboard
- Topic: ADXL345 with Pyboard
- Replies: 14
- Views: 23316
Re: Interfacing Sparkfun ADXL345 with Pyboard.
Hello everyone, does anyone know how to change this code, to code that will be compatible with pyboard. Thank you. import time import spidev import datetime import RPi.GPIO as GPIO spi = spidev.SpiDev() spi.open(0,0) spi.max_speed_hz = 2000000 spi.mode = 3 pinNum = 21 GPIO.setmode(GPIO.BCM) GPIO.set...
- Fri Apr 08, 2016 12:55 pm
- Forum: MicroPython pyboard
- Topic: ADXL345 with Pyboard
- Replies: 14
- Views: 23316
Re: Interfacing Sparkfun ADXL345 with Pyboard.
Hello, could someone help me in this. My idea is to interface the sparkfun ADXL345 with the pyboard through SPI communication, and log the data in to the SD card. please help me with code. Im new to programming and pyboard too. Thing is I have done the program in python for the same application usin...
- Tue Apr 05, 2016 6:55 am
- Forum: MicroPython pyboard
- Topic: ADXL345 with Pyboard
- Replies: 14
- Views: 23316