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 - lcpalm

Pages: 1
For what it's worth... I hooked up the sensor to A2 instead of A5 and it worked fine.
Not sure what is wrong (is A5 not an analog input?) but will go ahead and use A2.

I'm having trouble and not sure why: Have a circuit set up with a sensor attached to A0, and it reads fine; but if I attach the sensor to A5, it does not report the input.

Here is my code:


#include <SPI.h>

int readValue1 = 0;
int readValue2 = 0;

// setup for TinyZero
#if defined(ARDUINO_ARCH_SAMD)
  #define SerialInterface SerialUSB
  #define SerialInterface Serial

void setup() {


void loop() {

  String dataString = "";

  readValue1 = analogRead(A0);
  readValue2 = analogRead(A5);

  dataString += String(readValue1);
  dataString += ",";
  dataString += String(readValue2);





My circuit is:
 VCC ---> 220ohm ---> IR-emitter ---> GND
VCC ---> 10k ohm ---> A0 [or A5]
                                |--> IR-detector ---> GND

This works as expected when connected to A0: it reports low values when there is IR light striking the IR-detector, and reports high values when the light is blocked. That is, in serial monitor, we get sensor value in A0, and nothing meaningful in A5, as expected:
A0, A5
361,382 <-- when light blocked
349,373 <-- blocked
340,354 <-- blocked

But when connected to A5, it doesn't report sensor value in A5:
A0, A5
that is, here the second column should be low; but it never is.

I'm not sure what is wrong here?

Thank you!

Hi Réna,

Oh, wow - thank you. To do this I'd need to acquire a much tinier soldering iron than I have.
That looks super challenging.
But might go for it!

Thank you for your help!


I have a TinyZero project and would like to attach an external power switch (have wires running to a power switch attached on the enclosure of my project).  I bought a little switch, but am not sure how to wire it up to the TinyZero, or if this is even possible?

Thank you!

Hi Réna,

Thanks for your response! Yes, it was something with the serial communication --- I set it to have a 3s delay during startup, and that seemed to take care of it.

I do have another question now -- I would like to set up my TinyZero with an external power switch (like, run wires about 2-3" away so that I can have a power switch on the bottom of my little device I'm building, instead of moving the switch on the card itself.) I bought a little switch but am not sure how to hook it up, or if this is possible...

Should I submit this as a separate question?

Thank you!

TinyDuino Processors & TinyShields / Tinyzero won't run off battery?
« on: March 23, 2021, 06:11:44 PM »
Hi, I have a TinyZero circuit built, which runs fine off USB but won't seem to run off battery power.

The battery charges (amber light), but when the USB is removed the system doesn't seem to turn on. It's the 3.7V 150mA Li-Ion battery from TinyCircuits.

The circuit is: TinyZero hooked up to micro SD shield and to protoboard leading to an IR sensor pair, which logs beam-breaks.  It works as expected under USB, incrementing the file name on startup (ie every time it's turned on with the power switch on the TinyZero, or the USB is re-plugged in, it starts a new data log on the SD.) But on removing the USB and trying to run off battery power alone, it doesn't turn on and doesn't write any files.

Not sure how to troubleshoot this.... am new to TinyDuino. Thanks in advance for any help!

Pages: 1
SMF spam blocked by CleanTalk