Hello, I saw this reply and was very happy to see that someone else was using a XIAO. I am trying to get this compiled using the files listed here, but I keep running the compiler telling me that the class FlashClass has no member named 'read_offset'. I have the Nmra files in the Nmra folder in libraries, and the FlashStorage file in the library for the XIAO. I did try loading the FlashStorage library and putting it there with no help. My appologies for the newb question, but we all gotta start somewhere. Thanks!
Closed this issue · 9 comments
I have a version where I ported the code to Seeed Studio XIAO. I have implemented a conditional compile so the EEPROM code works for getting and setting CVs. Attached are files. I also made changes to FlashStorage.h so that the read operations would be very efficient. The XIAO only has emulated storage. If can be backwards compatible so only one library is needed.
NmraDcc.h.txt
NmraDcc.cpp.txt
FlashStorage.h.txt
Originally posted by @billswartz7 in #38 (comment)
Hi again. I figured out that the library FlashStorage.h was not in the correct spot. I reloaded everything from scratch and put the files in and successfully compiled. I am still unable to get the chip to accept any input from the DCC signal though. I'm trying to do some debugging on it, but not having much luck. Any help would much be appreciated.
I've just pushed an update to the library version 2.0.14 that will use the FlashStorage_SAMD library to provide emulated EEPROM.
I was able to build and run the NmraDccMultiFunctionMotorDecoder sketch and compiled and ran ok and displayed DCC Packets as I change the throttle settings for DCC Loco Short Address 3.
Please update the library when version 2.0.14 is available and try it
Well, still no joy. I can make the decoder work by commenting out the "DECODER_LOADED", but even then only function 0 and speed work. Changing values in any other function don't work at all. If I uncomment the DECODER_LOADED, it does nothing. I've tried a few different of the sketch examples without any luck. I tested the XIAO with a flash write/read sketch and that seems to work fine.
Well, still no joy. I can make the decoder work by commenting out the "DECODER_LOADED"
Sorry, my testing was using the sketch: NmraDccMultiFunctionDecoder_1 and not the one that you were using. but I've switched the one you were using and tweaked it to work with the Xiao and seemed to work ok.
Your comments about "DECODER_LOADED" don't make sense to me as I can't find what you are referring to. Could this be something you have added and if so can you email it to me.
but even then only function 0 and speed work. Changing values in any other function don't work at all. If I uncomment the DECODER_LOADED, it does nothing. I've tried a few different of the sketch examples without any luck.
The sketch was only ever intended to demonstrate motor speed and direction and directional headlight function. No other functions were supported in the sketch.
I tested the XIAO with a flash write/read sketch and that seems to work fine.
Ok, good. That was the main objective of my code changes in the library.
I have just added the example: NmraDccMultiFunctionMotorDecoder-XIAO-Expansion which will run on the Seeed Xiao + Xiao Expansion board and IoTT DCC Communication Interface connected to the Grove Analog Port and displays Throttle actions on the OLED display