Coder Social home page Coder Social logo

Comments (4)

AndyEngland521 avatar AndyEngland521 commented on September 23, 2024

The SparkX version of the OpenLog runs a different firmware version than the new SparkFun OpenLog. You will need to update the firmware on your SparkX OpenLog to the most current version (contained in this repo) in order to get things working. In the mean time I'm looking into your compile error on SAMD21.

from qwiic_openlog.

mattljc avatar mattljc commented on September 23, 2024

I'm having similar issues with the Red version of the qwiic OpenLog connected to a SAMD21 RedBoard Turbo. Running example 1 results in missing characters and missing newlines.

Things tried so far:

  • Adding 100ms delays after print statements to ensure the buffers clear
  • Increasing and decreasing the I2C clock speed
  • Reducing string lengths to 8 chars

from qwiic_openlog.

mantonakakis1 avatar mantonakakis1 commented on September 23, 2024

The SparkX version of the OpenLog runs a different firmware version than the new SparkFun OpenLog. You will need to update the firmware on your SparkX OpenLog to the most current version (contained in this repo) in order to get things working. In the mean time I'm looking into your compile error on SAMD21.

Updated the SparkX Qwiic OpenLog to firmware 2.0 by uploading the Qwiic_OpenLog.ino file from the latest firmware folder using an FTDI board (confirmed the firmware update worked by changing the "no card" error from 3 blinks to 2 blinks), making sure I followed the instructions in the HookUp guide regarding supprting libraries.

I then tried writing some simple data to the SD card with a BlackBoard. It writes consistently, but it is SLOW. With 20ms delay between three print commands (time, a comma, and a counter value), I get about 1.5 to 1.8 seconds per loop. It was also extremely slow running some of the examples in the library.

Tomorrow I will test with the non-X version of the OpenLog, without any firmware changes from the way it shipped, using the BlackBoard.

Here's the code I tested with:

#include <Wire.h>
#include "SparkFun_Qwiic_OpenLog_Arduino_Library.h"
OpenLog myLog;
  
int now = 0;
int loopDelay = 20;
int count = 0;

void setup()
{  
  Serial.begin(9600);
  Serial.println("Starting"); 
  Wire.begin();
  Wire.setClock(400000);
  pinMode(LED_BUILTIN, OUTPUT);
  delay(100);
  myLog.begin();
  delay(100);
}

void loop()
{
  now = millis();
  myLog.print(now);
  delay(loopDelay);
  myLog.print(", ");
  delay(loopDelay);  
  myLog.println(count);    
  count++;
  digitalWrite(LED_BUILTIN, HIGH);
  delay(20);
  digitalWrite(LED_BUILTIN, LOW);
}

from qwiic_openlog.

mantonakakis1 avatar mantonakakis1 commented on September 23, 2024

After my last post I reflashed the firmware without any changes, and it suddenly worked a bit better - but for the 60ms of total delay in my loop function, I was getting about 150-250ms per loop. After a few seconds, one of the times through the loop would slow down a lot, closer to 1s, then back to ~200ms.

Tried the same sketch with the new "red" version of the Qwiic OpenLog with whatever firmware it shipped with, and got the same result.

Tried another SparkX version of the board, with whatever firmware it shipped with about 2 months ago, and it wrote much faster, subjectively looked like it was running at the full 60ms loop speed. Unfortunately, the new library doesn't match the firmware it and prints the garbled output with the "spades" symbols (so I can't say for sure how fast it was).

So I think I can conclude the following with a bit of confidence:

  • New firmware is quite slow, regardless of board version, using the latest firmware and libraries on a BlackBoard.
  • New version of the board with stock firmware writes faster with a SAMD21 board, but incomplete print commands, missed new lines, etc.
  • Old firmware seems like it doesn't suffer the same speed issues, but it doesn't work well with new libraries, which makes sense.

from qwiic_openlog.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.