Search found 118 matches

by nikhiledutech
Thu Apr 26, 2018 5:36 am
Forum: Other Boards
Topic: Problem with I2C
Replies: 2
Views: 2270

Problem with I2C

Hello, I am little confused about how I2c works in micropython. from machine import Pin, I2C i2c = I2C(scl= ' PB8', sda = 'PB9') buf_write = bytearray(5) buf_read = bytearray(5) for x in range(5): buf_write[x] = 1 #Writing buffer to memory address starting from 1 of slave at address 57 i2c.writeto_m...
by nikhiledutech
Wed Apr 25, 2018 9:12 am
Forum: Development of MicroPython
Topic: Problem working MPU9250
Replies: 3
Views: 3632

Re: Problem working MPU9250

Hey, I have tried your method (below mention ) before and bumped me with same error of " No such I2C instance" But I solved the above issue by importing I2C from machine. from mpu9250 import MPU9250 from machine import I2C x = I2C(1, I2C.MASTER) imu = MPU9250 (x) And the above code work properly. St...
by nikhiledutech
Wed Apr 25, 2018 5:25 am
Forum: Development of MicroPython
Topic: Problem working MPU9250
Replies: 3
Views: 3632

Problem working MPU9250

Hey, I am interfacing IMU10DOF sensor ( Mpu9250 at addr 0x68 and BMP280 at addr 0x77) with STM32F4 disc board. I referred this module: https://github.com/micropython-IMU/micropython-mpu9x50 For using MPU9250 we need to create instance of I2C, which i created below. from pyb import I2C from mpu9250 i...
by nikhiledutech
Mon Apr 23, 2018 8:45 am
Forum: Other Boards
Topic: STM32F407 Disc: Problem with I2C in MPU9205
Replies: 2
Views: 2293

Re: STM32F407 Disc: Problem with I2C in MPU9250

Hey,

I have MPU-9250 at addr 0x68 and BMP280 at addr 0x77 (119) in my IMU10DOF module.
x = I2C(1, I2C.MASTER, baudrate = 115200)
imu = MPU9250(x)
it gives me error of Invalid I2C instance.
And from terminal if use x.scan it give me address of [104,119].


How to solve this issue ?
by nikhiledutech
Fri Apr 20, 2018 6:34 am
Forum: Other Boards
Topic: STM32F407 Disc: Problem with I2C in MPU9205
Replies: 2
Views: 2293

STM32F407 Disc: Problem with I2C in MPU9205

Hello,

I have just started using this MPU9250 module from Peter Hinch. I have connected MPU9250 to I2C interface and used i2c.scan() it gives me [104, 119].

I am facing problem in the following line.

imu = MPU9250('1')

It throws an error of I2C(1) doesn't exist. But i can use I2C(1).
by nikhiledutech
Fri Apr 13, 2018 7:10 am
Forum: Other Boards
Topic: Error in using I2C with color sensor
Replies: 2
Views: 2522

Error in using I2C with color sensor

Hello, I am currently interfacing color sensor with STM32Fdisc board. and below i have given the code. It throws up an ""TypeError: can't convert list to int"" . # main.py -- put your code here! # /**I2C1 GPIO Configuration # PB8 ------> I2C1_SCL # PB9 ------> I2C1_SDA import pyb from pyb import I2C...
by nikhiledutech
Mon Apr 02, 2018 8:52 am
Forum: Other Boards
Topic: Issues in Display data on LCD
Replies: 4
Views: 3595

Re: Issues in Display data on LCD

it was running in past. But i tried it now and its not working. So definitely it should be a hardware problem ?
by nikhiledutech
Sat Mar 31, 2018 9:23 am
Forum: Other Boards
Topic: Issues in Display data on LCD
Replies: 4
Views: 3595

Issues in Display data on LCD

Hello, I am unable to display data on LCD. Below is my code. Can anyone help me out. import uasyncio as asyncio import utime as time from alcd import LCD, PINLIST lcd = LCD(PINLIST, cols = 16) async def lcd_task(): for secs in range(20, -1, -1): lcd[0] = 'Edutech Learning' lcd[1] = "Solution" await ...
by nikhiledutech
Mon Mar 26, 2018 7:02 am
Forum: Programs, Libraries and Tools
Topic: Why my simple LED example is not toggling
Replies: 2
Views: 2268

Re: Why my simple LED example is not toggling

Also there is some issues with LCD example. I have created this example before 2-3 months. But its not working now. Did any library got updated. The below code dont give me error, but it dont give me output either. import uasyncio as asyncio import utime as time from alcd import LCD, PINLIST lcd = L...
by nikhiledutech
Mon Mar 26, 2018 5:55 am
Forum: Programs, Libraries and Tools
Topic: Why my simple LED example is not toggling
Replies: 2
Views: 2268

Why my simple LED example is not toggling

Here is my simple example to blink LED, and i guess it was working properly previously but its not working now. import pyb from pyb import Pin, delay #Initalising LED Pins led1 = pyb.Pin('PE8', Pin.OUT, Pin.PULL_DOWN) #Blinking lEd while (True): led1.low() #Turning LED ON pyb.delay(5000) led1.high()...