Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
New to Arduino
I am new to Arduino so I am sorry if this is a question with a simple answer.? I have searched and found that there are other pins like pin 13 that you can use for input and output.? I have a Mega 2560 with a LCD shield on it.? This shield covers or uses most of the pins for input and output.? What I need to do is to use a pin to control a relay in a power strip that turns it on and off.? The input are two temperature sensor that based on the readings I decided to turn on the power strip.? With the lcd screen on how do I use other pins to accomplish my tasks.
73 John Galway KH6JTE |
John: If the shield is a Mega "piggyback shield", it does cover all of the 'unused" pins. I see two alternatives. One is to select the pins you wish to use and solder small pigtails to the top side of the Mega pin(s) and use that pigtail to connect to the external device. Another alternative is to take a small, insulated piece of solid hookup wire (e.g., #22), strip about 3/8" of the insulation off of it, and plug that end into the Mega pin socket you want to use, then re-mount the display. The wire can be bent over and should not affect the connections from the display to the board. Jack, W8TEE
On Friday, July 24, 2020, 1:49:14 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
I am new to Arduino so I am sorry if this is a question with a simple answer.? I have searched and found that there are other pins like pin 13 that you can use for input and output.? I have a Mega 2560 with a LCD shield on it.? This shield covers or uses most of the pins for input and output.? What I need to do is to use a pin to control a relay in a power strip that turns it on and off.? The input are two temperature sensor that based on the readings I decided to turn on the power strip.? With the lcd screen on how do I use other pins to accomplish my tasks. 73 John Galway KH6JTE |
OK now that you know what the board looks like how to I connect a output that works on pin 13 and two inputs that also work on pin 13 so I can use them with the setup I have .? I tested the outputs and inputs on other pins and they worked there also.? With all the other pins exposed can I use them in place of pin 13?? If so how? John Galway KH6JTE PS.? It was you AA that I built got this bug into me.
On Friday, July 24, 2020, 3:09:28 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
That would be even easier since the pin sockets are exposed. My display for the Mega looks like: which covers up the pins. Jack, W8TEE
On Friday, July 24, 2020, 3:58:54 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
This is what the Mega 2560 with the LCD shield on it. |
A couple of things. First, do you know what Arduino graphics library your display uses? Second, pin 13 on the Arduino family of controllers is usually tied to the onboard LED as seen in the example Blink sketch. That is a general purpose I/O pin. Therefore, it would seem to me that you should be able to use any of the Mega's general purpose I/O pins for whatever you want to connect to it. Obviously, you'll need to change the code so it looks for the new pin number instead of pin 13. Just be sure that any device you connect to an I/O pin doesn't carry more than 5V or draw much over 35mA. Also, save the analog pins for other uses and use the digital I/O pins. Jack, W8TEE
On Friday, July 24, 2020, 4:17:08 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
OK now that you know what the board looks like how to I connect a output that works on pin 13 and two inputs that also work on pin 13 so I can use them with the setup I have .? I tested the outputs and inputs on other pins and they worked there also.? With all the other pins exposed can I use them in place of pin 13?? If so how? John Galway KH6JTE PS.? It was you AA that I built got this bug into me.
On Friday, July 24, 2020, 3:09:28 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
That would be even easier since the pin sockets are exposed. My display for the Mega looks like: which covers up the pins. Jack, W8TEE
On Friday, July 24, 2020, 3:58:54 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
This is what the Mega 2560 with the LCD shield on it. |
Thanks for that piece of advice.? I am using library ILI1941.? I know how to change from pin 13 to say pin 10 but how do I select say digital 22?? I have not gotten it to work yet?? John, KH6JTE
On Friday, July 24, 2020, 3:26:56 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
A couple of things. First, do you know what Arduino graphics library your display uses? Second, pin 13 on the Arduino family of controllers is usually tied to the onboard LED as seen in the example Blink sketch. That is a general purpose I/O pin. Therefore, it would seem to me that you should be able to use any of the Mega's general purpose I/O pins for whatever you want to connect to it. Obviously, you'll need to change the code so it looks for the new pin number instead of pin 13. Just be sure that any device you connect to an I/O pin doesn't carry more than 5V or draw much over 35mA. Also, save the analog pins for other uses and use the digital I/O pins. Jack, W8TEE
On Friday, July 24, 2020, 4:17:08 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
OK now that you know what the board looks like how to I connect a output that works on pin 13 and two inputs that also work on pin 13 so I can use them with the setup I have .? I tested the outputs and inputs on other pins and they worked there also.? With all the other pins exposed can I use them in place of pin 13?? If so how? John Galway KH6JTE PS.? It was you AA that I built got this bug into me.
On Friday, July 24, 2020, 3:09:28 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
That would be even easier since the pin sockets are exposed. My display for the Mega looks like: which covers up the pins. Jack, W8TEE
On Friday, July 24, 2020, 3:58:54 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
This is what the Mega 2560 with the LCD shield on it. |
Can you send me the program you're using? Jack, W8TEE
On Friday, July 24, 2020, 4:34:02 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
Thanks for that piece of advice.? I am using library ILI1941.? I know how to change from pin 13 to say pin 10 but how do I select say digital 22?? I have not gotten it to work yet?? John, KH6JTE
On Friday, July 24, 2020, 3:26:56 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
A couple of things. First, do you know what Arduino graphics library your display uses? Second, pin 13 on the Arduino family of controllers is usually tied to the onboard LED as seen in the example Blink sketch. That is a general purpose I/O pin. Therefore, it would seem to me that you should be able to use any of the Mega's general purpose I/O pins for whatever you want to connect to it. Obviously, you'll need to change the code so it looks for the new pin number instead of pin 13. Just be sure that any device you connect to an I/O pin doesn't carry more than 5V or draw much over 35mA. Also, save the analog pins for other uses and use the digital I/O pins. Jack, W8TEE
On Friday, July 24, 2020, 4:17:08 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
OK now that you know what the board looks like how to I connect a output that works on pin 13 and two inputs that also work on pin 13 so I can use them with the setup I have .? I tested the outputs and inputs on other pins and they worked there also.? With all the other pins exposed can I use them in place of pin 13?? If so how? John Galway KH6JTE PS.? It was you AA that I built got this bug into me.
On Friday, July 24, 2020, 3:09:28 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
That would be even easier since the pin sockets are exposed. My display for the Mega looks like: which covers up the pins. Jack, W8TEE
On Friday, July 24, 2020, 3:58:54 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
This is what the Mega 2560 with the LCD shield on it. |
#define relay 22??????? // Tells Arduino the relay is connected to pin 13 void setup() { ? Serial.begin(9600); ? pinMode(relay, OUTPUT);????? // Initialize the Atmel GPIO pin as an output ? Serial.println("out of setup"); } void loop()????????????????? // Loops forever { ? Serial.println("on"); ? digitalWrite(relay, HIGH);?? // Turn the relay on (HIGH is the voltage level = 1) ? delay(10000);?? // Stay ON for 5 seconds ? Serial.println("off"); ? digitalWrite(relay, LOW);??? // Turn the relay off by making the voltage LOW = 0 ? delay(10000);???????????????? // Stay OFF for 5 seconds } The println are diag
On Friday, July 24, 2020, 3:42:50 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
Can you send me the program you're using? Jack, W8TEE
On Friday, July 24, 2020, 4:34:02 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
Thanks for that piece of advice.? I am using library ILI1941.? I know how to change from pin 13 to say pin 10 but how do I select say digital 22?? I have not gotten it to work yet?? John, KH6JTE
On Friday, July 24, 2020, 3:26:56 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
A couple of things. First, do you know what Arduino graphics library your display uses? Second, pin 13 on the Arduino family of controllers is usually tied to the onboard LED as seen in the example Blink sketch. That is a general purpose I/O pin. Therefore, it would seem to me that you should be able to use any of the Mega's general purpose I/O pins for whatever you want to connect to it. Obviously, you'll need to change the code so it looks for the new pin number instead of pin 13. Just be sure that any device you connect to an I/O pin doesn't carry more than 5V or draw much over 35mA. Also, save the analog pins for other uses and use the digital I/O pins. Jack, W8TEE
On Friday, July 24, 2020, 4:17:08 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
OK now that you know what the board looks like how to I connect a output that works on pin 13 and two inputs that also work on pin 13 so I can use them with the setup I have .? I tested the outputs and inputs on other pins and they worked there also.? With all the other pins exposed can I use them in place of pin 13?? If so how? John Galway KH6JTE PS.? It was you AA that I built got this bug into me.
On Friday, July 24, 2020, 3:09:28 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
That would be even easier since the pin sockets are exposed. My display for the Mega looks like: which covers up the pins. Jack, W8TEE
On Friday, July 24, 2020, 3:58:54 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
This is what the Mega 2560 with the LCD shield on it. |
No, this says the relay is to be attached to pin 22. The code simply turns the relay on and off for 10 seconds. Read the reviews and then get a copy of Beginning C for Arduino, 2nd Ed from Amazon. You'll have fun with it. Jack, W8TEE
On Friday, July 24, 2020, 4:52:31 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
#define relay 22??????? // Tells Arduino the relay is connected to pin 13 void setup() { ? Serial.begin(9600); ? pinMode(relay, OUTPUT);????? // Initialize the Atmel GPIO pin as an output ? Serial.println("out of setup"); } void loop()????????????????? // Loops forever { ? Serial.println("on"); ? digitalWrite(relay, HIGH);?? // Turn the relay on (HIGH is the voltage level = 1) ? delay(10000);?? // Stay ON for 5 seconds ? Serial.println("off"); ? digitalWrite(relay, LOW);??? // Turn the relay off by making the voltage LOW = 0 ? delay(10000);???????????????? // Stay OFF for 5 seconds } The println are diag
On Friday, July 24, 2020, 3:42:50 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
Can you send me the program you're using? Jack, W8TEE
On Friday, July 24, 2020, 4:34:02 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
Thanks for that piece of advice.? I am using library ILI1941.? I know how to change from pin 13 to say pin 10 but how do I select say digital 22?? I have not gotten it to work yet?? John, KH6JTE
On Friday, July 24, 2020, 3:26:56 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
A couple of things. First, do you know what Arduino graphics library your display uses? Second, pin 13 on the Arduino family of controllers is usually tied to the onboard LED as seen in the example Blink sketch. That is a general purpose I/O pin. Therefore, it would seem to me that you should be able to use any of the Mega's general purpose I/O pins for whatever you want to connect to it. Obviously, you'll need to change the code so it looks for the new pin number instead of pin 13. Just be sure that any device you connect to an I/O pin doesn't carry more than 5V or draw much over 35mA. Also, save the analog pins for other uses and use the digital I/O pins. Jack, W8TEE
On Friday, July 24, 2020, 4:17:08 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
OK now that you know what the board looks like how to I connect a output that works on pin 13 and two inputs that also work on pin 13 so I can use them with the setup I have .? I tested the outputs and inputs on other pins and they worked there also.? With all the other pins exposed can I use them in place of pin 13?? If so how? John Galway KH6JTE PS.? It was you AA that I built got this bug into me.
On Friday, July 24, 2020, 3:09:28 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
That would be even easier since the pin sockets are exposed. My display for the Mega looks like: which covers up the pins. Jack, W8TEE
On Friday, July 24, 2020, 3:58:54 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
This is what the Mega 2560 with the LCD shield on it. |
I just thought of something .? Where is a good ground out of the available pins?
|
Get an image of the board: and print it out. There are multiple GND points on the board. Jack, W8TEE
On Friday, July 24, 2020, 10:28:57 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
I just thought of something .? Where is a good ground out of the available pins?
|
Jack two things.? The picture you supplied I had never seen.? The pin labels answered so many question for me.? I rechecked the program again and it still did not work so I went back to basics and looked at the wiring.? Lo and behold one of the wires was not in correctly.? Fixed and everything is working now.? Sometimes it is the smallest thing that stops you. Thank you for your advise and patience it is appreciated. 73 John Galway, KH6JTE
On Friday, July 24, 2020, 9:53:13 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
Get an image of the board: and print it out. There are multiple GND points on the board. Jack, W8TEE
On Friday, July 24, 2020, 10:28:57 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
I just thought of something .? Where is a good ground out of the available pins?
|
If you ever need a pin out image, go to your Internet browser and type in the search, like? ??? ATMega2560 pinout When the browser returns, right below the search dialog box you will see: "All?? Images?? Shopping....." Click on the Images option and you will be presented with a bunch of pinout images. Jack, W8TEE
On Saturday, July 25, 2020, 1:06:39 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
Jack two things.? The picture you supplied I had never seen.? The pin labels answered so many question for me.? I rechecked the program again and it still did not work so I went back to basics and looked at the wiring.? Lo and behold one of the wires was not in correctly.? Fixed and everything is working now.? Sometimes it is the smallest thing that stops you. Thank you for your advise and patience it is appreciated. 73 John Galway, KH6JTE
On Friday, July 24, 2020, 9:53:13 PM CDT, jjpurdum via groups.io <jjpurdum@...> wrote:
Get an image of the board: and print it out. There are multiple GND points on the board. Jack, W8TEE
On Friday, July 24, 2020, 10:28:57 PM EDT, John Galway via groups.io <jjgalway@...> wrote:
I just thought of something .? Where is a good ground out of the available pins?
|
to navigate to use esc to dismiss