Hey All,
I'm a newbie that is trying to understand all of this Arduino stuff, and would like to build a "monitoring system only", for my stock 1931 Ford Model "A". The systems overall functions itself isn't really important at this point in time as it will be evolving as I learn how all of this Arduino stuff works.
I thought I'd start out small. You have to learn how to crawl before you can walk, and eventually lean how to run.
I have a Temperature sensor sketch that works just fine with (10) DS18B20 sensors but I'd like to data log the information onto a SD card. I have compiled some components to either use the Mega board or a ESP32 board. I'd like to add the SD card reader and if possible, the NEO06 GPS unit as well so all the information gets written to the SD card and monitor.
Elegoo Mega 2560 v3
MELIFE ESP32
https://a.co/d/4Btbmtk
HiLetGo HW-125 SD Card Adapter
https://a.co/d/7I8ZlfF
GY-NEO6MV2 GPS
https://a.co/d/d2vevpS
Is this something a newbie could handle, because I've tried and there and I'm still scratching my head. I can read schematics and build the stuff, but the programming, Is my weak spot.
Here is the DS18B20 that I can get to work and would like to add the logger into it, and if possible, the GPS as well.
Thank You for reading this thread.
Regards
Bill
#include <OneWire.h>
#include <DallasTemperature.h>
// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 2
// Setup a oneWire instance to communicate with any OneWire devices
OneWire oneWire(ONE_WIRE_BUS);
// Pass our oneWire reference to Dallas Temperature.
DallasTemperature sensors(&oneWire);
// Addresses of 3 DS18B20s
uint8_t sensor1[8] = { 0x28, 0xF5, 0x4D, 0x49, 0xF6, 0x14, 0x3C, 0x67 };
uint8_t sensor2[8] = { 0x28, 0xA9, 0x79, 0x49, 0xF6, 0x36, 0x3C, 0xFF };
uint8_t sensor3[8] = { 0x28, 0x67, 0xDE, 0x49, 0xF6, 0x5F, 0x3C, 0xF9 };
uint8_t sensor4[8] = { 0x28, 0x07, 0x76, 0x49, 0xF6, 0x88, 0x3C, 0x01 };
uint8_t sensor5[8] = { 0x28, 0x52, 0x0F, 0x49, 0xF6, 0xCC, 0x3C, 0xFA };
uint8_t sensor6[8] = { 0x28, 0xD8, 0x29, 0x49, 0xF6, 0xC7, 0x3C, 0x98 };
uint8_t sensor7[8] = { 0x28, 0xA7, 0x6B, 0x49, 0xF6, 0xE2, 0x3C, 0x70 };
uint8_t sensor8[8] = { 0x28, 0xE7, 0x88, 0x49, 0xF6, 0xC5, 0x3C, 0x3E };
uint8_t sensor9[8] = { 0x28, 0xAC, 0x4A, 0x49, 0xF6, 0xD1, 0x3C, 0xC5 };
uint8_t sensor10[8] = { 0x28, 0x3F, 0x84, 0x49, 0xF6, 0x1D, 0x3C, 0x54 };
void setup(void)
{
Serial.begin(9600);
sensors.begin();
}
void loop(void)
{
sensors.requestTemperatures();
Serial.print("Sensor 1: ");
printTemperature(sensor1);
Serial.print("Sensor 2: ");
printTemperature(sensor2);
Serial.print("Sensor 3: ");
printTemperature(sensor3);
Serial.print("Sensor 4: ");
printTemperature(sensor4);
Serial.print("Sensor 5: ");
printTemperature(sensor5);
Serial.print("Sensor 6: ");
printTemperature(sensor6);
Serial.print("Sensor 7: ");
printTemperature(sensor7);
Serial.print("Sensor 8: ");
printTemperature(sensor8);
Serial.print("Sensor 9: ");
printTemperature(sensor9);
Serial.print("Sensor 10: ");
printTemperature(sensor10);
Serial.println();
delay(1000);
}
void printTemperature(DeviceAddress deviceAddress)
{
float tempC = sensors.getTempC(deviceAddress);
// Serial.print(tempC);
// Serial.print((char)176);
//Serial.print("C | ");
Serial.print(DallasTemperature::toFahrenheit(tempC));
//Serial.print((char)176);
Serial.println("F");
}