Portability between Feather Huzzah and ItsyBitsy

Hi,
Have a Sketch up and running on a Feather (Huzzah) it all seems fine. Uses DS3231 and NeoPixels.

I'm trying to get this to run on an ItsyBitsy M4 but just hooking up the hardware I got no output on the NeoPixels and the RTC was returning data like it wasn't there. Should I expect this to work?

Relatively new to this. I'm using library by Korneliusz Jarzebski which was recommended on one of the forums and seems to work well on the Feather. When I run an I2C scanner it finds the DS3231 at the right address so I think my wiring is correct. I tried loading the Adafruit RTClib - that does seem to find the device but seems to return weirdness occasionally and I cant get it to accept the date and time from rtc.adjust method. Sorry its a bit of an open question but do you guys think it should just work?

Hi @d8v8.

Please post your full sketch.

I'll provide instructions you can follow to do that:

  1. If you are using using Arduino IDE: select Tools > Auto Format from the menus.
  2. Click on the window that contains your sketch code.
  3. Press the Ctrl+A keyboard shortcut (Command+A for macOS users).
    This will select all the text.
  4. Press the Ctrl+C keyboard shortcut (Command+C for macOS users).
    This will copy the selected text to the clipboard.
  5. Open a forum reply here by clicking the "Reply" button.
  6. Click the <CODE/> icon on the post composer toolbar.
    This will add the forum's code block markup (```) to your reply to make sure the error messages are correctly formatted.
  7. Press the Ctrl+V keyboard shortcut (Command+V for macOS users).
    This will paste the copied code into the code block.
  8. Move the cursor outside of the code block markup before you add any additional text to your reply.
  9. Repeat the above process if your sketch has multiple tabs.
  10. Click the "Reply" button to post the output.

Please provide a detailed description of how you have these connected to the ItsyBitsy M4, including any external circuitry.

Ideally, this would be in the form of a schematic diagram, but since this sounds like a fairly simple circuit, a list of the connections would probably be fine for now.

If you installed it using Library Manager (Sketch > Include Library > Manage Libraries... in Arduino IDE or Libraries > Library Manager in Arduino Cloud Editor) then say so and state the full name of the library.

If you downloaded it from the Internet, then please post a link to where you downloaded that library from.

Please provide a detailed description of what you mean by "weirdness":

  • What did you do?
  • What were the results you expected from doing that thing?
  • What were the results you observed that did not match your expectations?

Does this "weirdness" still occur if you disconnect the NeoPixels from the board, remove the NeoPixel code from your sketch, and upload the simplified sketch to the board?

So some of the questions. I have neopixels on digital pin 13 and that’s it apart from i2c. I have a separate 3v supply for the DS and for now just powering the ‘boards’ from usb; with a common ground. Neopixels also have dedicated 5v for extra current.

When it didn’t just work as I had hoped, I unplugged the NeoPixels and just went back to basic sketches to try and find what was up.

The weirdness with the rtc was that the month would get reported differently in the demo sketch, and I couldn’t set the time although I have not investigated that yet.

I’ve subsequently switched it back to the Feather and all fine.

I have also tried a 2nd ITSY but same with that, I had had problems with the serial ports on these but I reset them with double hit on the reset button and they seemed to come back to life.

This is the library I have been using.

#include <Wire.h>
#include <DS3231.h>

DS3231 rtc_clock;
RTCDateTime dt;

void setup() {
Serial.begin(115200);

// Initialize DS3231
Serial.println("Initialize DS3231");

rtc_clock.setDateTime(DATE, TIME);
}

void loop() {

Serial.println("Loopy....");

dt = rtc_clock.getDateTime();

// For leading zero look to DS3231_dateformat example

Serial.print("Raw data: ");
Serial.print(dt.year);
Serial.print("-");
Serial.print(dt.month);
Serial.print("-");
Serial.print(dt.day);
Serial.print(" ");
Serial.print(dt.hour);
Serial.print(":");
Serial.print(dt.minute);
Serial.print(":");
Serial.print(dt.second);
Serial.println("");

delay(1000);
Serial.println("");
}



I also read that the ITSY may require pullups on SCA/SCL tried that also :frowning:

That did turn out to be significant; I think I was just getting away with it on the Feather but switching to another RTC module (sparkfun) I had I could not make that work at all without pullups on the ITSY. Now my Feather version wont work either pullups or not, so suspecting its just crapped out on me or maybe I have got library clashes I dont know about..

BTW is there a way to clean install the IDE. I tried just removing it with windows uninstall but when I re-installed it had all my old settings back..

Anyhoo the SFun device seems to work on the ITSY ok and I also have the pixels working on that. I'm going to try a replacement DS3231 next...