Jump to content

stasundr

Members
  • Content Count

    11
  • Joined

  • Last visited

  1. 1) No, it doesn't. It's just glare on a liquid flux. 2) rtc.RTC_month within 1-12 range. 3) LED connected to pull-down resistor by track under the button. R3 is red one in the bottom side. 4) There's no diode in my board. May be you are talking about thermoresistor?
  2. Thank you very much! The problem was with that RX pin. Now everything seems to work fine.
  3. Hi, everyone! (I'm completely newbie, so excuse me if my questions are stupid) I made my first "device" (pic related). It works fine for a short period of time (like an hour or something like that), but then it goes crazy: led start blinking all the time and device don't respond when I change temperature. Could you please tell me, what's wrong? (I tried both - CR3024 battery and 3.3V power supply) #include <msp430.h> #include <RTCplus.h> RealTimeClock rtc; //initialise the global RealTimeClock instance int sensorPin = A3; // select the input pin for the potentiometer int ledPin = P1_1; // select the pin for the LED int sensorValue = 0; #ifdef RTCWITHDATE const char Months[]="JanFebMarAprMayJunJulAugSepOctNovDec"; #endif void DisplayTime() //routine to format & print the time to the serial port { #ifdef RTCWITHDATE const char * MonthText; #endif if (rtc.RTC_hr<10) Serial.write('0'); Serial.print(rtc.RTC_hr); Serial.write(':'); if (rtc.RTC_min<10) Serial.write('0'); Serial.print(rtc.RTC_min); Serial.write(':'); if (rtc.RTC_sec<10) Serial.write('0'); Serial.print(rtc.RTC_sec); #ifdef RTCWITHDATE MonthText=Months+(rtc.RTC_month-1)*3; Serial.write(32); if (rtc.RTC_day<10) Serial.write(32); Serial.print(rtc.RTC_day); Serial.write(32); Serial.write(*(MonthText)); Serial.write(*(MonthText+1)); Serial.write(*(MonthText+2)); Serial.write(32); Serial.print(rtc.RTC_year); #endif Serial.println(" "); } void setup() { Serial.begin(9600); //initialise Serial pinMode(ledPin, OUTPUT); rtc.begin(); //initialise the RTC rtc.Set_Time(23,59,0); //Set the time to 23:56 #ifdef RTCWITHDATE rtc.Set_Date(2013,2,28); //Set the date to 28 Feb 2013 #endif }; void loop() { DisplayTime(); //call our routine that outputs the time digitalWrite(ledPin, LOW); if (rtc.RTC_min < 5) { // CRYSTAL TEST //digitalWrite(ledPin, HIGH); //delay(25); //digitalWrite(ledPin, LOW); //delay(1975); } else { // THERMISTOR TEST sensorValue=analogRead(sensorPin); digitalWrite(ledPin, HIGH); // turn the LED on (HIGH is the voltage level) delay(25); digitalWrite(ledPin, LOW); // turn the LED off by making the voltage LOW delay(sensorValue); }; }; RTC_ISR(void) { rtc.Inc(); // Update chunks }; (The overall purpose of this device is just to log temperature on SD card)
  4. Hopefully, it is possible to live with. Could you evaluate my plan? 1) Create two 2mb "empty" files on SD card (fileA and fileB). 2) Write log data to fileA and remember how much space already have taken. 3) When fileA is almost full with log data, start writing to fileB 4) When fileB is almost full with log data, start writing to fileA and so on. Considering the fact that 1 line of log less then 32 bytes (YYYY.MM.DD HH.MM Temp) and mcu check temperature once in a minute, 2mb file can store data for one month and a half. File size could be increased, 2mb files are just for test purposes.
  5. It is possible to write into my file ("SDCARD~1.TXT"), but by some reason I can't exceed initial size (37 bytes). Could someone please explain me the reason why? Is it related with msp430g2553 ram size?
  6. omg! Thank you so much! Your code really works Now I'm gonna try to write on SD card
  7. Thank you for your help. Considering the fact that I'm just a newbie, it's impossible for me to rewrite large portions of the SD library. So it looks more reasonable to use a bluetooth module instead of SD card and just send temp. sensor data right to the server.
  8. roadrunner84, thank you! Now the idea is clear. Could you please give me an idea how to implement write to sd card in this way? Is it possible to do it in Energia or something more sophisticated is required?
  9. Sorry, I still don't get it. Is it possible to write anything on SD card with msp430g2553? In this case I will store every log string in a separate file. Or maybe I need to find SD card with <512 bytes sectors? I'm currently using very old 16mb Toshiba card. Mb it is the right one...
  10. All I need is just log date and temperature, so I do hope that MSP430G2553 will be enough... 2553 actually is only thing I have.
  11. Hello, everyone! So I've connected SD card to launchpad (g2553). When I'm trying to execute PFatFsFileTest I'll get something like: Press button to start... Failed with rc=6 The only file on sdcard is "SD card test.txt", but I can't open it (probably because of spaces in the filename? or mb I did something wrong. idk). And... I've soldered sdcard, so I can't write any new file in there T_T Is it possible to do smth to make things work or I need to unsolder it first? Thanks a lot in advance.
×
×
  • Create New...