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?
toggle quoted message
Show quoted text
On Fri, Jul 24, 2020 at 21:10, jjpurdum via groups.io <jjpurdum@...> wrote:
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.
|