Go Down

Topic: error using resistors to make several buttons with one pin. Lilypad mp3 (Read 370 times) previous topic - next topic

MarkT

The value read from an analog pin that is not connected is completely undefined.  Could be anywhere,
the pin is floating electrically.

However the pins are not unconnected, the Lilypad MP3 schematic clearly shows most of the analog pins are internally connected to various LEDs, pull-downs, pull-ups, whatnot.

This means you have to understand that board and its schematic before using the analog pins, many of which are not available to general use.https://cdn.sparkfun.com/datasheets/Dev/LilyPad/LilyPad-MP3-v15a.pdf
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

relate530

When someone is on the ball enough to tell you which Arduino board is involved, at least take that into
account before answering!  This is very simply a feature of the board:

The Lilypad MP3 board has I2C pullups on A4 and A5 which double as the I2C bus.  There are pcb jumpers
that can be severed with a craft knife / scapel carefully if you don't want the pullups in circuit.

You are simply seeing the effect of the on-board 4k7 resistor between A4 and 3.3V rail.
Thanks MarkT! Now it makes sense.
I was looking at the schematics and understand more what you said. I am scared about the cutting, never tried that before  :o . Should I scratch all the copper layer or just the tiny link between the two blocks? I made this photo to illustrate better my question.

https://drive.google.com/open?id=1D-9Yk6iV-Zc0r4SbzqQiUtKV6QYssl0a

I was also using the sketch that came for default loaded to the board (trigger), which I understand mention some things about the I2C protocol. Do I have to modify  this code too in order to use some of its functions?

(I've attached the sketch, too long to quote)

Thanks again for your help!

lastchancename

Great - good work!
This is where documenting your project really helps.
Hoping your project goes well.
Schematics should indicate pull-ups etcto help visualise 'voltage' biases in a circuit..
10 points to @MarkT
Experienced responders have a nose for laziness, (they were beginners once)... Sure, there are trolls, chest-beaters, and pretenders - but the help you'll get here is about as good as it gets - if you try to help youself!.

raymw

According to the schematic, disconnect sj1 & sj2 to disable I2C pullups on a4 a5

ballscrewbob

@relate530

TOPICS MERGED.

DO NOT cross post as it wastes peoples time and efforts to help you.

Please read link this before adding any further posts.

T.I.A.

Bob.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

Go Up