Trying to "move" project from UNO to Pro Micro

I've been working on a project that's soon ready to be permanently installed in my house/garage. To minimize the size and stuff, I'd like to change the arduino in my project from the uno I've been using while making it, over to a board identical to this (Sparkfun Pro Micro 5v). Now, what I need to have connected to the board is a couple of buttons, which shouldn't be a problem - and a LCD screen. To be more specific - this one: LCM1602 IIC V1.

Now - on the wiki for the LCD, it says that the display should be connected to ground, 5v, SDA (A4 on UNO) and SCL (A5 on UNO). Now... the Pro Micro doesn't have A4 and A5. Instead, it's got the SDA on pin 2, and SCL on pin 3. How can I change how the sketch (or library?) treats this - so that it knows how I've hooked the display up?

And also - is it impossible to get a 5v output from the Pro Micro? Because it doesn't have a pin for it, like the UNO does. How do I solve this? Could I use any random pin, and just set it to HIGH, perhaps?

Any tips on how to move my project from the UNO to the Pro Micro is welcome!

How can I change how the sketch (or library?) treats this - so that it knows how I've hooked the display up?

What sketch? What library?

In general, the hardware handles I2C pins (A4/A5) so the hardware know what pins to diddle on each Arduino. All you have to do is connect your I2C device to the correct pins.

And also - is it impossible to get a 5v output from the Pro Micro? Because it doesn't have a pin for it, like the UNO does. How do I solve this? Could I use any random pin, and just set it to HIGH, perhaps?

If the Pro Micro is a 5V device, and you need very little current, that would work. What do you need the 5V for?

I'm not sure about the random pin, though. A specific pin would probably be better.

For I2C, just use pin 2 and 3. The library knows.

The ‘raw’ is the voltage input and the ‘Vcc’ is the 5V output.
The Vcc is not labeled as ‘5V’, because it can be ‘3.3V’ on other boards.

Ah, OK. Thanks!

I managed to get it to work now. I tried it before posting, but nothing would work. Turned out the USB-cable wasn't working properly :slight_smile:

There appears to be several threads for this project:
I'm assuming that this project is the same as these:
http://forum.arduino.cc/index.php?topic=212811.0
http://forum.arduino.cc/index.php?topic=213553.0

My concern is for using 20M cables for signals and power.
How are you planning to wire things up?

Now that you are using a Pro Micro, you have some other possibilities.

I would put the Arduino micro, one button and the LCD together in the case, and use a wire for the
garage door sensor switch.
Since the Micro is so small you could eliminate the I2c backpack and hook the pins on the Micro
directly to the LCD inside the case.

How are you planning on powering the device?

If power is remote, then I'd use a higher voltage or posssibily even low voltage AC (12-24 volts)
then convert it back to 5v inside your case.

Not sure how/where you were planning on mounting the case but have you
considered using a smaller LCD display which could be used inside
a standard wall plate and receptacle?

Also, are you adding the switch to detect the door, or are you trying to use
an existing one?
If you are using an existing garage door switch, you will have to make sure that there
is no voltage on that line and you will have join ground on your project to the ground
of garage door switch.

--- bill

Hi!
Sorry about the different threads. I was trying to separate it a bit by topic.

Aaaanyway...

As for power, the plan is to get it from my doorbellpower, if the 9v adaptor I was planning on using doesn't work. The power for the doorbell is 12v AC. It is located a meter or so from where the display is going up. I could also use a 12v or 24v DC-outlet I have in my garage, if all else fails.
I don't want the arduino with the screen because I might add RFID outside the door later, so that's why I want the arduino in the garage. The switch I'm using on the garage door is one of those magnetic window sensor-thingys. I got it in the mail today, and just tested it - works like a charm! :slight_smile:

I am also adding two more buttons, connected to relays. One to open/close the door (so that I can remove the ugly one I've got now) and one to reset the garage door motor, which tends to hang up every couple of weeks, or something.

As for the wiring, I had hoped I could use the cat6-cable, with dupont connectors, but if that doesn't work in the test phase, I'll figure something else out. I've already got four wires from A to B, so I might use those.

Thanks again for quick replies and helpful comments - I am learning (though slowly, hehe) very much from them!

:slight_smile: