I have a sketch available on Github for a thermometer/hygrometer working on a UNO (I modified it to show Celsius). To finish the project I want to get it running on a Pro Mini so I can put it in an enclosure and finish it.
It has been several years since I started (and left it for quite a while) and I have fumbled my way to the following stage:
configured the Arduino app on Mac to work with the Pro Mini
got the Blink sketch uploaded and working
updated the libraries for the TFT and DHT22
recompiled the sketch and uploaded it to the Pro Mini
wired the mini to 5V (raw pin)
connected the power to the TFT and DHT
Now, I don’t know for sure how to modify the sketch and attach the sensor and screen digital connections as the pin numbering is clearly not the same. I assume that i just need to reassign the digital IOs in the sketch but what pins to use?
Is it OK to upload the UNO sketch here for advice?
Either use the Reply button rather than Quick Reply or use Quick Reply, enter your reply then preview. Either way the "Attachments and other options" link will be available below the editor window
May be I looked at the wrong schematic. I will use this one that has the same pin numbering as on the board.
Can anyone help with tbe problem?
Do I simply wire the Pro Mini the same as the UNO , or do I have to modify the sketch?
Promini is wired the same as an Uno, Same processor, same IO pinout.
D0 to D13 are all the same
A0 to A5 are all the same (they also function as D14 to D19).
Promini may also have A6, A7, which are analog input only and not available on the Uno.
Look up a pro mini pinout diagram, you seem to be numbering the pins from the physical connector instead of the arduino pin designations. There should not be any modification needed for the code.
OK got it wired up and working. There is some strange behaviour, often when power is turned on the display shows only “zeros” for the temp and humidity and it doesn’t change. Other times it shows actual data.
Sometimes it boots up showing data and then, refreshes the screen and reverts to “zeros”.
It is sometimes stable showing live data.
It did this before with the UNO.
I need it to be a bit more reliable.
I am using the AM2320B sensor.
Anyone know why that might be?
Sensor board had no faulty joints.
Point to point wiring according to schematic.
3D printed a case and installed it with USB power and external reset switch. Sensor glued onto case rear.
Still have issue of getting it to start up consistently.
Is there a boot sequence in the code?
How do I do that (sorry complete programming idiot here)?
Do I attach the FTDI and run the Serial monitor in the IDE or do I have to upload a sketch to the Pro Mini first?
The humidity reading from the DHT22 is way off compared to several other standalone devices I have (showing 70 vs 47).