Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jlastofka

Pages: 1 2
1
TinyDuino / Re: TinyZero, bootloader button and Arduino IDE
« on: November 22, 2019, 12:35:02 PM »
Update a couple days later with more experience with this. I haven't had to use the bootloader button in days. Seems clicking outside of the IDE and then getting back in (and a couple of times I cycled the power on the TinyZero while experimenting with this) will get the serial port to show up again.
Seems like more of an IDE issue than a TinyZero issue, although it works reliably on the TinyDuino. Hmmmm....

2
TinyDuino / TinyZero, bootloader button and Arduino IDE
« on: November 20, 2019, 09:30:10 AM »
In case other people are having a similar issue: I was getting pretty annoyed at the serial port disappearing from the port selection menu and having to use the boot loader button on the TinyZero and thinking about giving up on it and going back to the TinyDuino. However, it now seems that it's (often at least, or all the time?) a simple matter of clicking out of the IDE and then clicking back into it. The serial port magically reappears. Maybe it's an IDE issue on the Mac (and PC?) and not the TinyZero issue I (we?) thought.
I've had a somewhat similar issue with a CAD program where selection tools start misbehaving and simply clicking to another tab window and back fixes it, so now I think to try this in other places, and it worked here. Pretty easy workaround. Two clicks, problem solved. Probably. I'd be interested to hear if someone's seen similar behavior.

3
TinyDuino / Re: Analog read rate, TinyZero slower than TinyDuino ...??
« on: November 19, 2019, 05:29:34 PM »
I discovered the difference (probably). The TinyZero ADC is 12 bit A/D and the other is 10 bit so there's probably a basic hardware speed difference.

I wasn't really trying to make it faster. I just didn't know why it was different. I haven't done regular Arduino, only the Tiny products, and I didn't realize before that one needed to go look up the different Arduino models to know the differences between the Tiny products. Makes sense now that I see it.

4
TinyDuino / Analog read rate, TinyZero slower than TinyDuino ...??
« on: November 14, 2019, 10:18:59 AM »
I'm doing some testing with a simple loop that reads an input and stores to an integer array. I use micros() before and after the loop of say 10 readings, then after the timing loop I print out the time and the readings for inspection.
I'm getting MUCH faster reading time on the TinyDuino than on the TinyZero, which seems odd because it seems the TinyZero would be faster if anything, or the same if it's just the Analog input speed limit.

I get about 120 microseconds per reading on the TinyDuino
I get about 420 microseconds per reading on the TinyZero
I suppose it could be something different in the analog hardware, but the clock speed should be 8x on the Zero. I'm using default clock speeds and haven't changed any other settings if there are any.

I've tried different loop counts with about the same result. It shouldn't be anything about the serial port because I don't print anything until after the reading loop.
Anyone else know anything about different Analog Input rates for these processors?
What kind of reading speed do you see?

5
TinyDuino / Re: Maximum IO pin input voltage
« on: November 05, 2019, 08:36:12 AM »
I found the Microchip (manufacturer) spec for the processor and it says the maximum input voltage on the input pins is Vdd + .6V, so since we're running the processor on 3.3V the absolute max allowed Vin on the I/O pins is 3.9V

I'm going with that.

6
TinyDuino / Maximum IO pin input voltage
« on: November 02, 2019, 12:14:37 PM »
I've been searching the forum and the processor documentation but I can't seem to find the spec for the allowable input voltage on the digital IO pins. I saw one spot showing the Logic 0 and 1 levels for a 5V supply and a 3.3V supply setup, but not the maximum allowable.
Is it 5.5V, same as the max battery supply voltage? Does it depend on whether you're powering it from 3.3V or 5V (I doubt that)?
Someone telling me the value is somewhat helpful, but I'd like to know where it's listed officially.
Thanks.

7
TinyDuino / Re: Conflict between SD card and Accelerometer interface?
« on: November 01, 2019, 12:44:28 PM »
Well, it's finally all sorted out and working with my desired text outputs. In the end there was one more conflict as I loaded my original code back in. I had been using PIN 13 and the on-board LED for a blinking output before I had the SD card added into the system. Turns out that's a conflict with the SPI interface. I'll never forget that again:-)

That was likely my problem all along, but I'm sure I learned from going through this and from receiving the help.

Again, thanks for being attentive and supporting your customers. There are two of us out here doing about the same setup and we have a selection of your boards purchased already. Likely more to follow. They're really impressive little things.

8
TinyDuino / Re: Conflict between SD card and Accelerometer interface?
« on: October 31, 2019, 08:47:37 PM »
OK, I have it working now:-)

I used your example file and stripped out the parts about reading card types and directories, etc. I just want to write some text to a file.

I changed the SD startup command as shown below from your (now modified) file:

  // we'll use the initialization code from the utility libraries
  // since we're just testing if the card is working!
  if (!SD.begin(chipSelect)) {
    SerialMonitor.println("initialization failed. Things to check:");
   while (1);
  } else {
    SerialMonitor.println("Wiring is correct and a card is present.");
  }

And then to write text to the card I use:

  File dataFile = SD.open("datalog.txt", FILE_WRITE);

  // if the file is available, write to it:
  if (dataFile) {
    dataFile.println(dataString);
    dataFile.close();
    // print to the serial port too:
    SerialMonitor.println(dataString);
  }
  // if the file isn't open, pop up an error:
  else {
    SerialMonitor.println("error opening datalog.txt");
  }

Plus I had to increase the delay waiting for the serial port to initialize. I used 3000 ms but didn't try anything shorter.

I'm attaching the modified file in case you want to poke through it and see what I hacked up:-)    I'll clean it out some more and put in a little more of my final needs, a step at a time in case I break something and need to adjust.

Thanks again for the help, tips, ideas....   and for getting me close enough to get things working. It's nice to see the company's paying attention and taking the time to help people along.

9
TinyDuino / Re: Conflict between SD card and Accelerometer interface?
« on: October 31, 2019, 06:16:13 PM »
Actually, instead of digging into my example to find what doesn't work, could you just add a couple lines to your example that writes a few numbers of text data to a .txt file on the card? If I saw a working idea, I'd probably be done:-)

On the other hand, it sure would be nice to know why my idea works by itself but not in combination with the accelerometer files.

10
TinyDuino / Re: Conflict between SD card and Accelerometer interface?
« on: October 31, 2019, 05:32:06 PM »
So, this is where I'm failing now:

the code below works when I run it in a separate test program, but not when I add it to your example, or when I use it in my program that also uses the BMA250 files. I get the "error opening datalog.txt" message.

  File dataFile = SD.open("datalog.txt", FILE_WRITE);

  // if the file is available, write to it:
  if (dataFile) {
    dataFile.println(dataString);
    dataFile.close();
    // print to the serial port too:
    SerialMonitor.println(dataString);
  }
  // if the file isn't open, pop up an error:
  else {
    SerialMonitor.println("error opening datalog.txt");
  }

I've attached my Datalogger.ino file that runs and writes to the card. It's a pretty simple listing. I just can't get it to work in my other program or in your example....

11
TinyDuino / Re: Conflict between SD card and Accelerometer interface?
« on: October 31, 2019, 04:49:49 PM »
Thank you very much for helping on this. I loaded your example and I had to change the delay waiting for the serial port from 500 ms up to (I used) 3000 ms. I found that out before in something else I did that wasn't responding either. After that, your example runs, except it hangs on this line

root.ls(LS_R | LS_DATE | LS_SIZE);         and doesn't do anything.

I commented that out and the rest of it ran OK.
I'll now go in and try actually writing data to the SD card and I'll report back later.
Something up with that delay waiting for the port to respond....   
I set the baud to 9600 in the program by the way, so I don't have to change the monitor window every time I start it up.
Again, thank you for the response and help. It's a neat little product and a friend and I are using them to do some data acquisition during model rocket flights.

12
TinyDuino / Re: Conflict between SD card and Accelerometer interface?
« on: October 31, 2019, 12:04:12 PM »
It looks like the file handling methods using SdFat.h in the fitness tracker example are fairly complicated compared to the simpler syntax using SD.h, or maybe that's just the programmer's style. I'm having a hard time digging out what I need to copy over to my program. Maybe there's a simpler example somewhere?

13
TinyDuino / Re: Conflict between SD card and Accelerometer interface?
« on: October 31, 2019, 11:10:50 AM »
Thanks. I had looked at the compatibility matrix before I bought the hardware and it seemed OK. I looked at the code you linked and they're using SdFat.h instead of the SD.h I was using from another example I found from TinyCircuits.

I found SdFat.h and got that loaded and now it looks like I have to change some other spellings or calls so I'll look into that a bit. I'm hoping that there's something different in the SdFat.h used in that fitness tracker code that works around whatever's wrong (I think) with using SD.h I got from another TinyCircuits example listing.

14
TinyDuino / Conflict between SD card and Accelerometer interface?
« on: October 31, 2019, 09:36:13 AM »
There seems to be a conflict preventing me from opening a file and writing to it. I'm on a TinyZero but this might apply to all?

I can do it with just the SPI.h  and SD.h loaded, but when I add Wire.h and BMA250.h and the sensor reading code to the program it fails to open my data file for writing. I've copied the working code from the first case to the non-working second case, and put in a serial print statement to confirm my program's getting to the proper point where it tries to write to the card using the same pasted code that works without the Wire and BMA250 code for the sensor.

I found a couple posts related to a conflict like this with a display board, but nothing else.

Any clues would be appreciated.

Below are the header lines from the non-working program. Without the first two lines here, things are fine as discussed above.

#include <Wire.h>         // For I2C communication with sensor
#include "BMA250.h"       // For interfacing with the accel. sensor
#include <SPI.h>          // may not actually need this one
#include <SD.h>           // For SD card


const int chipSelect = 10;   // for TinyZero

15
TinyDuino / Re: Using TinyZero with MicroSD shield
« on: October 25, 2019, 02:32:54 PM »
Thank you. I had found the information about SerialUSB and put in those changes but you read my posting before I removed that part...

I had been looking at several places on the TinyCircuits site but didn't find the one for the SD card reader that you sent. I've now run the example you linked and it runs except it doesn't list the file I have on the SD card. I've put it there from a Windows 7 PC and also from my Mac. So I'll need to look into that some more.

This command doesn't seem to work:
root.ls(LS_R | LS_DATE | LS_SIZE);

I put in a print statement and the program's getting to that point. I made multiple copies of my small data.txt file in case it was a bug where only one file in the root directory won't display. I still need to poke at this some more.

Pages: 1 2
SMF spam blocked by CleanTalk