Search found 12 matches

by Duncan
Thu Oct 17, 2019 7:17 pm
Forum: Bitcraze
Topic: struct.error: unpack requires a buffer of 1 bytes
Replies: 0
Views: 22

struct.error: unpack requires a buffer of 1 bytes

Hi, I encountered some issues when I try to read the log variables. I write some codes to read the log variable and do some math. It work well at the beginning and read the desired log variables without any problem. But then, after updating a few hundred times, the code crashed and shows the followi...
by Duncan
Fri Feb 08, 2019 8:51 pm
Forum: Developer discussions
Topic: How to use EKF to estimate position
Replies: 3
Views: 1295

Re: How to use EKF to estimate position

Thank you, Arnaud. Yes, using RSSI to do the position localization is not accurate enough but I am trying to improve it with all kinds of math models. EKF is a part of them. I watched the source code "estimator_kalman" in the firmware and the resources you recommended. As you said, with those "measu...
by Duncan
Sun Feb 03, 2019 3:53 pm
Forum: Developer discussions
Topic: How to use EKF to estimate position
Replies: 3
Views: 1295

How to use EKF to estimate position

Hi, I am trying to estimate the position of the CF and some Bluetooth devices based on the Bluetooth RSSI value. I want to use the built-in EKF inside the CF firmware to realize it. Is it possible? And if it is, are there any materials(codes, similar projects, examples of using EKF, etc) I could ref...
by Duncan
Thu Sep 20, 2018 6:54 pm
Forum: Developer Discussions
Topic: [SOLVED] EEPROM: I2C connection [FAIL]
Replies: 10
Views: 1604

Re: EEPROM: I2C connection [FAIL]

It turns out that except the built-in pull up resistors, an external 10k resistor is also needed for SDA and SCL. After adding the external pull-up resistors, the program works and I can get the data from my sensor.
by Duncan
Sat Sep 15, 2018 12:15 am
Forum: Developer Discussions
Topic: [SOLVED] EEPROM: I2C connection [FAIL]
Replies: 10
Views: 1604

Re: EEPROM: I2C connection [FAIL]

It turns out that my I2C sensor didn't respond to the "write" command. But I have set it to "I2CDEV_NOMEM_ADDR" and crazyflie should directly send read command instead of sending write command at first. Whatever, I fixed the sensor to make it be able to respond to the write command. After the write ...
by Duncan
Thu Sep 13, 2018 8:58 pm
Forum: Developer Discussions
Topic: [SOLVED] EEPROM: I2C connection [FAIL]
Replies: 10
Views: 1604

Re: EEPROM: I2C connection [FAIL]

Here is the images of the ocsilloscope.

When my I2C sensor connecting to crazyflie:
Image


When my I2C sensor connecting to the arduino:
Image
by Duncan
Thu Sep 13, 2018 8:53 pm
Forum: Developer Discussions
Topic: [SOLVED] EEPROM: I2C connection [FAIL]
Replies: 10
Views: 1604

Re: EEPROM: I2C connection [FAIL]

One thing that could be happening is that the bus speed is configured too fast. It is currently configured at 400KHz: https://github.com/bitcraze/crazyflie-f ... _drv.c#L60 If your sensor does not support 400KHz I2C you can change the code above to set the bus at 100KHz. Hi arnaud, I change the bus...
by Duncan
Thu Sep 06, 2018 12:27 am
Forum: Developer Discussions
Topic: [SOLVED] EEPROM: I2C connection [FAIL]
Replies: 10
Views: 1604

Re: EEPROM: I2C connection [FAIL]

Hi arnaud, Can you test with the stock firmware to start the Crazyflie with and without your connections, that would verify if the problem is there or not. If it is, it would be useful to look at the signals with an oscilloscope to see what goes wrong with it. Are you attaching long cables or extra ...
by Duncan
Fri Aug 31, 2018 1:45 am
Forum: Developer Discussions
Topic: [SOLVED] EEPROM: I2C connection [FAIL]
Replies: 10
Views: 1604

Re: EEPROM: I2C connection [FAIL]

Hi, it does look like your connections are disturbing the I2C bus, the configuration EEPROM in the Crazyflie is connected to the deck-port I2C bus and so yes there is pull-ups in the Crazyflie on this I2C bus. You can look at the schematic if you want to see more precisely how things are cabled: ht...
by Duncan
Thu Aug 30, 2018 2:30 am
Forum: Developer Discussions
Topic: [SOLVED] EEPROM: I2C connection [FAIL]
Replies: 10
Views: 1604

[SOLVED] EEPROM: I2C connection [FAIL]

Hi, I am trying to add a sensor which would send the data back to crazyflie via the I2C bus so I wrote a deck driver. After I connected the cables (sensor SDA->crazyflie SDA, sensor SCL->crazyflie SCL), the crazyflie couldn't start normally(only two blue LEDs light solidly). There were two times I a...