Menu

Running on an XIAO?

2021-12-26
2021-12-29
  • Gregory Jones

    Gregory Jones - 2021-12-26

    I'm having trouble getting the code to assemble and link for a XIAO. I've

    include <i2c_eeprom.h> as the EEPROM support and modified MyEEPROM. Any</i2c_eeprom.h>

    thoughts would be welcome, but suspect I have a library issue.

    I've laid out a small board that carries a XIAO and a 8825 (ect) module. It
    includes an EEPROM (CAT24C08 in this case). Happy to share the design or
    can post it on the FS1 spectrograph (public domain). I have no intent to
    make and sell these.

    The form factor is a match with the NEMA-11 motor. Expect to solder the
    motor wires on instead using a connector.

    Greg Jones

     
  • brownrb

    brownrb - 2021-12-26

    Make sure that File Preferences has compiler warnings set to All and Display line numbers is checked

    Then compile - the warning messages are in the bottom window of the ide
    After it stops - copy all the text in that window, drop it into a text file, save it and send me a copy
    regards
    Robert

     
  • Gregory Jones

    Gregory Jones - 2021-12-27

    Thank you. I had done that, but got 2 assembly errors ""jmp 0" illegal instruction. The errors were referenced to a .S file that seems to be transient.

    It was the software_Reboot() routine.. Will see what if anything I can do with the XIAO to mimic.

    Great project BTW, MyFocuser2 that is.... Thank you for making it available.

     
  • brownrb

    brownrb - 2021-12-28

    You do understand that the software was designed for an arduino nano/uno, so somethings will not work on your platform

    It would be best to just remove the current statements from the software reboot, or at least for now comment them out with a comment not compatible with XIAO

     
  • Gregory Jones

    Gregory Jones - 2021-12-28

    Bob, yes, that's what I've done. I do realize this is a port and expect to run into some head scratches along the way. It looks like there is "Reset" support for the XIAO in Reset.h but will test and report back.

    I haven't connected the temp sensor and found out tonight that there may be one in the XIAO that could be use (with appropriate caveats). This is a stripped down implementation: USB, Temp sensor, stepper and not much more. If there is a temp sensor in the XIAO that would be good to know even if not used.

    The only question at the moment is feeding the queue.count. On or about myFP2_DRV8825_312: line 560 . I have not looked at other files in the package nor discussions but haven't found the input --
    if ( queue.count() >= 1 ) // check for serial command
    {
    ser_comms();
    }

    The USB input was not being read. I added this just before the statement above and all seems to work but haven't powered motors--
    while(Serial.available()) {
    serialEvent();
    };

    All good, great stuff...

     
    • brownrb

      brownrb - 2021-12-29

      I haven't connected the temp sensor and found out tonight that there may be one in the XIAO that could be use (with appropriate caveats). This is a stripped down implementation: USB, Temp sensor, stepper and not much more. If there is a temp sensor in the XIAO that would be good to know even if not used.

      Nope. Read the bits in the pdf about the temp probe and temperature compensation. We dont want the temperature of the device or the ambient temperature or the sky temperature. So as the tube expands or shrinks in length, the focal point (where the image is in focus) shifts accordingly

      This rate of expansion/reduction is fairly linear, so knowing that we can predict how much to move the stepper motor (ie focuser draw tube) for a given change in temperature, to keep the image focused.

      Metal has an expansion cofficient, meaning that the focuser tube and scope itself will change in length when temperature changes. So we need to measure the temperature of the tube, not the chip, not air, not sky. So the temp probe is mounted remotely onto the telescope tube.

      Search for
      aluminum expansion coefficient
      to get the idea.

      *he only question at the moment is feeding the queue.count. *

      in serialcomms.h
      in serialEvent()
      else
      {
      queue.push(line);
      }

      is where the command gets placed onto the queue

       
  • Gregory Jones

    Gregory Jones - 2021-12-28

    Bob, got rid of the "while and put the serialEvent() in a #else with the btEvent() so just one or the other. Guessing it doesn't, probably shouldn't be in an #else but in my case it won't matter.

     
    • brownrb

      brownrb - 2021-12-29

      One or the other,
      There is no harm leaving it in there if BLUETOOTH is not defined in controllerconfig.h then it has no effect.

       
  • Gregory Jones

    Gregory Jones - 2021-12-29

    Bob, thank you. I've used the #define-s to configure everything and only needed to modify those in the Temp routines. I added another #define for the internal SAMD temp and have that working. Mostly OR-ing the two defines but had to add an #ifdef line ~157 " sensor1.requestTemperatures();'

    I'm pretty sure the EEPROM mod is working, the write does for sure. The code is pretty easy to work with and it was easy to slip in the changes.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.