I am new to arduino and was wondering if I could get some help
I am having trouble figuring out the problem that I am having. I searched the error message and couldn't find the answer I was looking for.
im running Arduino 1.8.10
I am trying to get an LCD 2x16 message board by velleman to work.
Here is my code:
Could someone tell me what im doing wrong ?
Connections: LCD screen pin 1 is connected to ground pin 2 to 5v pin 3 is connected to the potentiometer
which pin 1 and pin 2 also go through. this potentiometer is a 10k ohm one. pin 4 is connected to the rs pin on the Arduino micro pin 5 is also connected to the same ground as pin 1 (I joined the wires together) pin 6 is connected to digital pin 2 on the Arduino micro. pin 7,8,9,10 are all not connected.
pin 11 is connected to digital pin 4 on the arduino micro. pin 12 is connected to digital pin digital pin 5, pin 13 to digital pin 6, pin 14 connected to digital pin 7. pin 15 is also connected to the same v5 as pin 2 (I also joined the wires together) and pin 16 is connected to the same ground as pin 1 and pin 5.
note that the ground pin on the arduino is connected to the pegboard aswell as the 5v one.
this link is how I connected the pins only instead of connecting it to the arduino mega its connected to the arduino micro. in the tutorial I was following it was noted that digital pin 1 served as the rs pin and the digital pin 1 doesn't exist on the arduino micro so I just connected it to the rs pin
if anyone knows a better way to connect all of it and knows why my code isn't working or knows a better code please respond it would be greatly appreciated
I'm very glad to see you solved your problem. It would be nice if you would take a minute to post a description of the solution you found. That will help anyone else with the same problem who later finds this thread while searching for information. I'm sure they would be very grateful.
Thanks!
oh well first of all my original way of solving was wrong (I connected the pins wrong) and I still have no idea why my code wouldn't verify but when I pasted the code in the online arduino editor it seemed to work. Then I just uploaded the code to my arduino micro board and I reconnected the pins following another guide which was from arduino itself and not some other forum. link to my pin connections: https://www.arduino.cc/en/uploads/Tutorial/LCD_Base_bb_Fritz.png
these connections seemed to work
please note that you need to turn the 10k ohm pot till you see the text being displayed.
I also used the code from Arduino's tutorials.
50/*
LiquidCrystal Library - Hello World
Demonstrates the use a 16x2 LCD display. The LiquidCrystal
library works with all LCD displays that are compatible with the
Hitachi HD44780 driver. There are many of them out there, and you
can usually tell them by the 16-pin interface.
This sketch prints "Hello World!" to the LCD
and shows the time.
The circuit:
LCD RS pin to digital pin 12
LCD Enable pin to digital pin 11
LCD D4 pin to digital pin 5
LCD D5 pin to digital pin 4
LCD D6 pin to digital pin 3
LCD D7 pin to digital pin 2
LCD R/W pin to ground
LCD VSS pin to ground
LCD VCC pin to 5V
10K resistor:
ends to +5V and ground
wiper to LCD VO pin (pin 3)
Library originally added 18 Apr 2008
by David A. Mellis
library modified 5 Jul 2009
by Limor Fried (http://www.ladyada.net)
example added 9 Jul 2009
by Tom Igoe
modified 22 Nov 2010
by Tom Igoe
This example code is in the public domain.
*/
// include the library code: #include <LiquidCrystal.h>
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
void setup() {
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("hello, world!");
}
void loop() {
// set the cursor to column 0, line 1
// (note: line 1 is the second row, since counting begins with 0):
lcd.setCursor(0, 1);
// print the number of seconds since reset:
lcd.print(millis() / 1000);
}
so basically connect the pins ast that png says and upload this code into your arduino micro then it should work.
you can also change the code of course and add other texts then just hello w(elapsed seconds)
If you go back to using the Arduino IDE and are still having this problem, feel free to come back here and we'll see if we can help you to fix it.
The "recipe.preproc.macros pattern is missing". Usually indicates that you're using a very outdated hardware package for the board you're using. Unless it's a 3rd party package that has been abandoned, you can likely just update to the latest version to fix the problem.
thats odd.
you say that the hardware package is outdated for the board im using. well since I bought the thing like a week ago they outdate fast then
because I don't think the problem is with the arduino micro hardware
I don't exactly know what outdated hardware package for the board you're using means but my guess is it means that I need to update the arduino ide
so I think I just need to remove my arduino application and install it again
yeah soo what (I just copied and pasted the same code from the create.arduino.cc website that worked and uploaded to my arduino and showed results) so the online version works and the arduino IDE doesn't work for whatever reason.
arduino IDE version 1.8.10
board selected Arduino Micro
and if the problem lies at the thing that adds support for the arduino board to the IDE then how come the online version did work ?
This is very strange. You are using the latest version of the Arduino AVR Boards hardware package. So you should not be getting that "recipe.preproc.macros pattern is missing" error. The only thing I can think is that the hardware package somehow got corrupted when you installed it.
Try this:
Tools > Board > Boards Manager
Wait for the download to finish.
Click on "Arduino AVR Boards".
From the dropdown "Select version" menu, select 1.8.1.
Click the "Install" button.
Wait for the installation to finish.
From the dropdown "Select version" menu, select 1.8.2.