Custom Build Deck - One Wire - Writing to EEPROM DS28E05

Firmware/software/electronics/mechanics
Post Reply
Lombazombie
Beginner
Posts: 11
Joined: Sun Mar 25, 2018 12:37 am

Custom Build Deck - One Wire - Writing to EEPROM DS28E05

Post by Lombazombie » Mon Jul 30, 2018 7:53 pm

Hello everyone,

We are building a custom deck that closely resembles the Z-Ranger for some research purposes. We were trying to write to the one wire (DS28E05) and are having some issues.

Do we need to write to the one wire since it resembles the Z-Ranger? (We are hoping to add more components to the same deck later on, but for now its only the laser sensor).

Thanks!

Lombazombie
Beginner
Posts: 11
Joined: Sun Mar 25, 2018 12:37 am

Re: Custom Build Deck - One Wire - Writing to EEPROM DS28E05

Post by Lombazombie » Wed Aug 01, 2018 6:39 am

So just in case anyone tries doing what we are trying to do, here is some info for the future. Please correct me if I am wrong. After talking to some more people and searching a bit I've found this.
  • You can force the deck to load. Here is an example of a deck build: How to Build A Deck
  • Even though the deck resembles the Z-Ranger, the one wire would need to have data written to it, as that's how you make the decks hot swap-able. However, it is not needed since you can force the deck every time in development. Here is some info on doing that: One Wire Write Steps
Hope that helps. Since it looks like at some point I will need to do the one wire either way, I followed the instructions above and changed the following code to fit my deck information: One Wire Code Change

However, the one wire is not even found by the crazyflie. I have been able to read info from other decks. I have never done this before and am fairly new to it. Any advice on what you guys think would be a good step forward would be awesome.

Thanks!

arnaud
Bitcraze
Posts: 1750
Joined: Tue Feb 06, 2007 12:36 pm

Re: Custom Build Deck - One Wire - Writing to EEPROM DS28E05

Post by arnaud » Thu Aug 02, 2018 12:53 pm

As you noted you can force the deck as a first approach and it should work fine.

If you add a onewire memory that is not programmed, the Crazyflie firmware will only load deck drivers in debug mode, this was intended as a safety features: if the memory is not written there is not way to check for conflict.

If your one-wire board is well soldered and connected, you should see a warning when starting the Crazyflie that one corrupted OW memory is detected. Then it should be possible to write it using the procedure you followed.

If you add more component later to the deck, you can make your own deck driver that starts the z-ranger driver, this is what we are doing in the flow deck: https://github.com/bitcraze/crazyflie-f ... #L186-L187

Post Reply