Sketch won't run

I have put this project together, and as you may see I have a half size pcb board strapped to a full sized bread board, and I’ve soldered a few male header pins, resistors and buttons to the pcb board.

I have checked that power is getting to each device which is attached , and there isi full continuity between various points on pcb board and breadboard.
The DS3107RTC is working and returns an address when I used the I2C scanner, and the display lights up when a 5volt 2.5 amp power supply is connected.

After I uploaded the sketch and powered up, only the display came on but no sketch running.

The code and a picture of the setup attached

MAX7219_RTC_dht11.ino (12.6 KB)

In your picture of the setup, it looks like the humidity sensor power is connected backwards.

but no sketch running.

If the upload was successful then the sketch will be running

Put some Serial.print()s in the code at strategic points such as entry to and return from functions and print out the value of pertinent variables. Is the code calling the functions that you expect and are the values of variables sensible ?

groundFungus: In your picture of the setup, it looks like the humidity sensor power is connected backwards.

Yes it was, and I noticed that fater I took the picture, but it is the right round now.

The display is supposed to scroll the date and time along with temperature and humidityL

https://arduino-projects-free.blogspot.com/2018/06/max7219-rtc-ds1307-dht11-led-matrix.html

UKHeliBob: If the upload was successful then the sketch will be running

Put some Serial.print()s in the code at strategic points such as entry to and return from functions and print out the value of pertinent variables. Is the code calling the functions that you expect and are the values of variables sensible ?

Thanks, but first off , it is not my code but from here:

https://arduino-projects-free.blogspot.com/2018/06/max7219-rtc-ds1307-dht11-led-matrix.html

I tried this:

RTC.readTime(); sprintf(psz, "%02d", RTC.s); Serial.print("Time");

But it didn't work, so I must have got it in the wrong place.

So I tried it here, but nothing printed out: RTC.readTime(); sprintf(psz, "%c%02d%c%02d", (f ? ':' : ' '), RTC.h, (f ? ':' : ' '), RTC.m); Serial.print("Time");

If you could point me to the right place please.

But it didn’t work

Did you add a Serial.begin() to setup() ?

After I disconnected the DHT sensor and buttons from the Arduino, I uploaded the MD_Parola,/ Parola_Scrolling, but that does not show anything on the display.

And in a serial monitor it shows: 17:30:50.011 -> ⸮⸮⸮⸮⸮⸮0⸮i8E2#

This is at the top of the sketch

if DEBUG

define PRINT(s, x) { Serial.print(F(s)); Serial.print(x); }

define PRINTS(x) Serial.print(F(x))

define PRINTX(x) Serial.println(x, HEX)

else

UKHeliBob: Did you add a Serial.begin() to setup() ?

No I didn't as I didn't know I had to do that. I've just added Serial.begin() now in the void setup(void) section, but the sketch won't compile.

I have uploaded the Parolla_Scrolling sketch, and have just the display attached to the arduino.

In a serial monitor this printed: 19:43:26.839 -> ⸮ 19:43:28.443 -> [Parola Scrolling Display] 19:43:28.443 -> Type a message for the scrolling display 19:43:28.443 -> End message line with a newline

There is nothing on the display, except that it is lit up

So as someone said earlier the sketch is running but the display does not show anything

I've just added Serial.begin() now in the void setup(void) section, but the sketch won't compile.

What baud rate did you specify in the the begin() function ?

UKHeliBob: What baud rate did you specify in the the begin() function ?

It was 57600 as specified in the said sketch

avalon66: It was 57600 as specified in the said sketch

Which sketch is that ?

What error did you get ?

UKHeliBob: Which sketch is that ?

What error did you get ?

It was the Parolla Scrolling sketch, and there was nothing on the display, as it went off. As soon as I plug in the usb lead to the arduino, the display lights up then goes off! Is it faulty or what as I have only had it for about a week and have not been able to get the sketch to run, even tho' it lights up.

I have uploaded the sketch and wiring diagram.

The sketch is over 600 lines so I can’t put it between code tags.

MAX7219 Dot Matrix 4-in-1 8x32 dot matrix common cathode.jpg

MAX7219_RTC_dht11.ino (12.6 KB)

I see that there is no Serial.begin() in the sketch nor any debugging Serial.print()s

What did you try ?

When I put Serial.begin () under void setup(void)

I got this error exit status 1 no matching function for call to 'HardwareSerial::begin()'

So where should I put it. Actually I did ask for you to point me to where I should put Serial.begin in another post

So where should I put it. Actually I did ask for you to point me to where I should put Serial.begin in another post

Put it in setup(), but you must specify the baud rate.

When I asked what baud rate you had used in the Serial.begin() you said, in post #10

It was 57600 as specified in the said sketch

So as before I uploaded the Parola_Scrolling sketch and it returned the exact same in a Serial Monitor as it did before.

The display lights up, but does not show anything at all in the display.

I have solved the problem now, in that I am now powering the Arduino by a 9volt power supply, and the display is now working fine. The text and numbers are scrolling across the the display.

I finally realised that 5volts was never going to be enough, as there are 3 devices connected to the breadboard, which all are 5 volt devices.

Thanks