I am not supposed to use any external libraries for any of the components and the libraries used should be user generated/defined. So far i can only display the temp and humidity using downloaded/external libraries:
`#include "LiquidCrystal.h"
LiquidCrystal lcd(8,7,6,5,4,3);
int sensorPin = 0;
void setup()
{
Serial.begin(9600);
lcd.begin(16,2);
}
void loop()
{
int reading = analogRead(sensorPin);
// measure the 5v with a meter for an accurate value
//In particular if your Arduino is USB powered
float voltage = reading * 4.68;
voltage /= 1024.0;
// now print out the temperature
float temperatureC = (voltage - 0.5) * 100;
Serial.print(temperatureC);
Serial.println(" degrees C");
lcd.setCursor(0,0);
lcd.print("Temperature Value ");
lcd.setCursor(0,1);
lcd.print(" degrees C");
lcd.setCursor(11,1);
lcd.print(temperatureC);
delay(100);
}
Wow...
We must have the exact parts make/model and a link to their online specs (if possible.)
It is possible to do as the prof asked, but external parts line LCD and sensors have "requirements" that must be provided by the microcontroller... these timing and electrical requirements are usually the stuff done by library code.
Correct me if I misrepresent what I think you are using:
I think the request is legitimate...
Many instructors these days are steering students to online to secure assistance... it is the new world we live in. Plus, TA and some profs are just plain lazy. Whatever the specifics, asking for help & direction is a long way from "give me a code..." that I often see.
Not the ???
We need specifics, like what Arduino model.
You need to look at the links I used, are your parts the same? You need to find and link specific datasheets for the parts. The datasheets are absolutely the most valuable component as they indicate electric and timing parameters that the (your) software must provide.
Can you briefly provide how much prior instruction you have with Arduino?
1 class, 2 classes, a year?
How many projects have you completed? Level of complexity, that is, just classwork or more complex and independent effort?
Were I approaching this, I would start with a fully working example to verify that the libraries, the Uno, and the wiring are all working.
That means continue your code until you get temperature and humidity readings using libraries. Post fully working code.