Search found 1324 matches

by Roberthh
Thu Apr 25, 2019 8:43 am
Forum: ESP32 boards
Topic: [HELP] Esp can't control OLED ssd1306 i2c
Replies: 2
Views: 30

Re: [HELP] Esp can't control OLED ssd1306 i2c

Note: I'm testing WITHOUT Oled.
If you are testing without OLED, then it's no surprise that you get that error, which says "Cannot talk to the OLED".
Fixing that is obvious!
by Roberthh
Wed Apr 24, 2019 1:03 pm
Forum: General Discussion and Questions
Topic: forum deadlock
Replies: 5
Views: 91

Re: forum deadlock

Just go ahead.
by Roberthh
Wed Apr 24, 2019 12:04 pm
Forum: General Discussion and Questions
Topic: forum deadlock
Replies: 5
Views: 91

Re: forum deadlock

Just post it like your questions about posting.
by Roberthh
Wed Apr 24, 2019 5:42 am
Forum: ESP8266 boards
Topic: Gyro/Mpu_Calibration "ESP8266"
Replies: 22
Views: 550

Re: Gyro/Mpu_Calibration "ESP8266"

The statement:

Code: Select all

self.iic.writeto(self.addr, bytearray([107, 0]))
is required to initialize the device, so please do not skip it.
by Roberthh
Tue Apr 23, 2019 2:27 pm
Forum: MicroPython pyboard
Topic: First Connect
Replies: 2
Views: 36

Re: First Connect

The problem lies in the caching of the file system by the PC. After modifying the files on Pyboard, make sure that all chnages are written back. You can do that by closing the disk on the PyBoard. On Linux systems, you can also run the command 'sync' . Mounting the PyBoard file system on a PC is so ...
by Roberthh
Tue Apr 23, 2019 11:53 am
Forum: Hardware Projects
Topic: How to expand the size of spiflash?
Replies: 5
Views: 68

Re: How to expand the size of spiflash?

If it is an ESP32, the magic is in modules/flashbdev.py. You get a larger file system, if you change it to the one below. Please note that only the last line is changed. import esp class FlashBdev: SEC_SIZE = 4096 START_SEC = esp.flash_user_start() // SEC_SIZE def __init__(self, blocks): self.blocks...
by Roberthh
Tue Apr 23, 2019 11:40 am
Forum: Hardware Projects
Topic: How to expand the size of spiflash?
Replies: 5
Views: 68

Re: How to expand the size of spiflash?

Which board are you using, and do you want to extend the file system?
by Roberthh
Tue Apr 23, 2019 9:39 am
Forum: General Discussion and Questions
Topic: square signal for buzzer
Replies: 7
Views: 111

Re: square signal for buzzer

For Arduino, the code in the sketch is the only that's running. Using Micropython, there are quite a few background tasks active, including the communication stack. This causes a "square" wave loop like yours not being regular and the average execution time per loop being extended. 85µs for a functi...
by Roberthh
Mon Apr 22, 2019 7:36 pm
Forum: ESP8266 boards
Topic: Gyro/Mpu_Calibration "ESP8266"
Replies: 22
Views: 550

Re: Gyro/Mpu_Calibration "ESP8266"

You can activate the built-in lowpass filter, by writing a value between b'\x00' and b'\x06' to memory address 0x1a, e.g. self.iic.writeto_mem(self.addr, 0x1a, b'\x06') 06 gives the strongest filter, slowing indeed responses. Using this setting, I captured some data sets with get_values(). The effec...
by Roberthh
Mon Apr 22, 2019 3:51 pm
Forum: ESP8266 boards
Topic: Gyro/Mpu_Calibration "ESP8266"
Replies: 22
Views: 550

Re: Gyro/Mpu_Calibration "ESP8266"

I updated the code. in one of my posts above. But here it is again: import machine class accel(): def __init__(self, i2c, addr=0x68): self.iic = i2c self.addr = addr self.iic.writeto(self.addr, bytearray([107, 0])) def get_raw_values(self): a = self.iic.readfrom_mem(self.addr, 0x3B, 14) return a def...