Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

METRO MINI DATALOGGER
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

METRO MINI DATALOGGER

by cking0704 on Wed Mar 25, 2020 8:51 am

Hello all,

I've tried searching this topic and I've found a number of suggestions, but they either a) didn't work or b) were contradicted by other advice. I am attempting to finish up a work project using a Metro Mini in a datalogging light meter. I coded and debugged on my work PC (Win10) and everything was fine. Now I'm working from home (thanks, COVID-19) on my Mac Pro (the garbage can one) and I've installed the latest OS X updates and the latest Arduino IDE updates. The COM ports don't show up. I've seen reference to this in a lot of places, with suggested fixes ranging from installing drivers (which come with warnings against doing so on newer OS X releases) to ensuring the data transfer rate isn't too fast (umm...?).

Any advice?

Also, I thought I'd share some photos of what I'm doing here...just 'cause.
IMG_8575_red.jpg
IMG_8575_red.jpg (349.35 KiB) Viewed 87 times
IMG_8566_red.jpg
IMG_8566_red.jpg (314.21 KiB) Viewed 87 times

cking0704
 
Posts: 19
Joined: Wed Mar 25, 2020 8:09 am

Re: METRO MINI DATALOGGER

by mikeysklar on Wed Mar 25, 2020 4:36 pm

This is a beautiful looking data logger.

There are OSX drivers that need to be installed to see the COM/serial.

https://www.adafruit.com/product/2590

Mac & Windows People! Don't forget to grab & install the FTDI VCP drivers from FTDI and the SiLabs CP210x drivers from SiLabs to make the COM/Serial port show up right! The default drivers may not support the interface chip!

mikeysklar
 
Posts: 2007
Joined: Mon Aug 01, 2016 8:10 pm

Re: METRO MINI DATALOGGER

by cking0704 on Wed Mar 25, 2020 5:36 pm

Of all the places not to have looked, right there on the product page! Thanks so much. It worked without so much as a reboot.

Glad you like the design. We're multiplexing TSL2591 sensors on what is essentially a fancy surveyor's prism pole. It allows us to move around an inspection site and measure illuminance at various positions. The FILE button creates a CSV file on the SD card with a unique name (based on RTC) and the REC button stores data in the file.

Here's a little more:

IMG_8554.jpg
IMG_8554.jpg (281.5 KiB) Viewed 74 times
IMG_8570.jpg
IMG_8570.jpg (427.98 KiB) Viewed 74 times

cking0704
 
Posts: 19
Joined: Wed Mar 25, 2020 8:09 am

Re: METRO MINI DATALOGGER

by cking0704 on Sun Mar 29, 2020 11:17 am

I'm back. This time it's about the pin change interrupt I'm using. It keeps triggering off of the button press for ISR2. Anyone seen this behavior? Did I code it wrong?

Code: Select all | TOGGLE FULL SIZE
/*SOME LIBRARIES AND DECLARATIONS*/

const byte isr1Pin = 2;
const byte isr2Pin = 3;
const byte isr3Pin = 9;
unsigned long last_isr1_t = 0;
unsigned long last_isr2_t = 0;
unsigned long last_isr3_t = 0;
const byte SDPin = 10;
volatile bool wake = false;
volatile bool sleep = false;
volatile bool record = false;
bool wrote = false;
volatile bool make = false;
bool made = false;
volatile byte dmode = 6;
volatile bool relabel = false;
unsigned short int count = 0;


void setup() {
  cli();
  PCICR |= 0b00000001;
  PCMSK0 |= 0b00000010;
  sei();
  /*SOME MORE CODE*/
  pinMode(isr1Pin, INPUT_PULLUP);
  pinMode(isr2Pin, INPUT_PULLUP);
  pinMode(isr3Pin, INPUT);
  attachInterrupt(digitalPinToInterrupt(isr1Pin), ISR1, RISING);
  attachInterrupt(digitalPinToInterrupt(isr2Pin), ISR2, RISING);
}

/*SOME MORE CODE*/

void ISR1() {
  unsigned long isr1_t = millis();
  if (isr1_t - last_isr1_t > 500) {
    if (sleep == true){
      relabel = true;
      sleep = false;
      wake = true;
  }else{
      record = true;
  }
    last_isr1_t = isr1_t;
  }
}
void ISR2() {
  unsigned long isr2_t = millis();
  if (isr2_t - last_isr2_t > 500) {
    dmode++;
    if (sleep==true){
      dmode--;
      sleep = false;
      wake = true;
    }
    dmode = dmode % 7;
    relabel = true;
    last_isr2_t = isr2_t;
  }
}
ISR(PCINT0_vect) {
  unsigned long isr3_t = millis();
  if (isr3_t - last_isr3_t > 10000) {
    if (sleep==true){
      sleep = false;
      wake = true;
    }else{
      make = true;
    }
    last_isr3_t = isr3_t;
  }else{
    make = false;
  }
}
ISR(BADISR_vect){
}

cking0704
 
Posts: 19
Joined: Wed Mar 25, 2020 8:09 am

Re: METRO MINI DATALOGGER

by mikeysklar on Sun Mar 29, 2020 1:24 pm

Go ahead and start a fresh thread with the IRQ pin timer question.

Thanks for the additional shots. Just a beautiful build.

mikeysklar
 
Posts: 2007
Joined: Mon Aug 01, 2016 8:10 pm

Please be positive and constructive with your questions and comments.