Go Down

Topic: Arduino Micro (Read 294 times) previous topic - next topic

ptbuzzcut

Totally new to Arduino.  Following a tutorial  which says to connect wires to A0,VCC and GND.  The is no pin labelled VCC on my board.  Is there another that is the same just named differently?

DrAzzy

#1
Jan 11, 2019, 08:13 pm Last Edit: Jan 11, 2019, 08:14 pm by DrAzzy
Vcc is the pin with the voltage that the arduino is operating on - often labled either 5v or 3.3v depending on whether it's a 5v or 3.3v board.

It is not Vin - that's the voltage supplied to the barrel jack
ATTinyCore for x4/x5/x61/x7/x8/x41/1634/828/x313 megaTinyCore for the megaavr ATtinies - Board Manager:
http://drazzy.com/package_drazzy.com_index.json
ATtiny breakouts, mosfets, awesome prototyping board in my store http://tindie.com/stores/DrAzzy

wolframore

Bad Boys Rate Our Young Girls But Violet Goes willingly - Get Some Now :) - ELI the ICE man

ptbuzzcut

Okay, I follow what you are saying.  But in the tutorial, there are only three connections to the board and no power,unless it is getting it from the USB jack.  The three wires are from the potentiometer to the board A0, GND and VCC  So where do I connect the wire that is to go to VCC?  This is all new and a learning experience.
Thank you

cattledog

The Arduino Micro is a 5v board. It is getting is power from the USB connector to your computer. The 5v will be passed through to the pin on the board labeled 5v.

ptbuzzcut

I guess I am not understanding this.  I have 3 wires from the pot. It is clear that the two outside wires go to A0 and GRND. WHERE is the third wire( the middle one) connected to on the board?

cattledog

Quote
I have 3 wires from the pot. It is clear that the two outside wires go to A0 and GRND. WHERE is the third wire( the middle one) connected to on the board?
Most potentiometers have the two outer pins going to 5v and ground. The middle pin is from the "wiper" and goes top an analog input and reads some where between 5v and gnd.

ptbuzzcut

Rec'd pot today. Wires are connected to board at A0, gnd and 5V.  Center of pot to A0, and left and right to other 2 board pins.  Regardless of connection of pots outer pins, not receiving and midi out put. Windows does recognize device as Arduino Leonardo. Sketch (compiled and loaded without error)that I found is:
#include <MIDI.h>
#include <frequencyToNote.h>
#include <MIDIUSB.h>
#include <MIDIUSB_Defs.h>
#include <pitchToFrequency.h>
#include <pitchToNote.h>
MIDI_CREATE_DEFAULT_INSTANCE();

#define expPin A0

int currentVal = 0;
int lastVal = 0;
void setup() {
  // put your setup code here, to run once:
MIDI.begin();
}

void loop() {
  // put your main code here, to run repeatedly:
currentVal = analogRead(expPin);
  currentVal = map(currentVal, 0, 1023, 0, 127);
  currentVal = constrain(currentVal, 0, 127);

if(abs(currentVal-lastVal) > 1)
    {
     MIDI.sendControlChange(1, currentVal, 1);
    }
   
  lastVal = currentVal;
  delay(5);
 
}

cattledog

Quote
Regardless of connection of pots outer pins, not receiving and midi out put.
Are you able to read the pot and see changing values. First thing is to separate the hardware and connection issues of the pot from any thing else.

Quote
Windows does recognize device as Arduino Leonardo
What does this mean?

and how is it consistent with
Quote
Sketch (compiled and loaded without error)

Go Up