Popular posts from this blog
Day20
//SD read and write #include <SD.h> #include <Wire.h> #include <RTClib.h> const int CS_PIN =10; const int POW_PIN =8; //Default rate of 5 seconds int refresh_rate = 5000; //defining an abject RTC_DS1307 RTC; String year, month, day, hour , minute , second, time , date; void setup() { Serial.begin(9600); Serial.println("Initializing Card"); //CS pin is an output pinMode(CS_PIN, OUTPUT); Wire.begin(); RTC.begin(); if (!RTC.isrunning()) { Serial.println(F("RTC is not runnng")); RTC.adjust(DateTime(__DATE__,__TIME__)); } //Card will draw power from pin 8, so set it high pinMode(POW_PIN, OUTPUT); digitalWrite(POW_PIN, HIGH); if (!SD.begin(CS_PIN)) { Serial.println("Card Failure"); return; } Serial.println("Card Ready"); //Read the configuration information (speed.txt) File commandFile = SD.open("speed.txt"); if (commandFile) { Serial.println("Reading Command File"); whi...
Day7
the code for the sound lab using the cheap speaker. as with all the labs and project using the speaker, trying to get the thin wires to get into the breadboard and having it stay there took the longest. the lecture code for the recursive and non-recursive code for factorials the output for the factorials. they both seem alright and bad. JDoodle did have a small cap so i think higher numbers just gets capped.


Comments
Post a Comment