Show Posts
|
|
Pages: [1] 2
|
|
1
|
Using Arduino / Sensors / Re: Find sketch for rain sensor for seeduino
|
on: May 21, 2013, 10:53:32 am
|
|
hello 99er.
I'm testing the sketch you suggested, it actually works. but I question arises, (perhaps responded johnwasser) there is a method that the return values can be calculated speed or amount of rain in mm or volume of water '. I offer this question because they simply splashing water on the panel which has an area of:
* Control panel board Demintion: 30mm * 16mm * Area of raindrop detection board 54mm * 40mm
I believe that with some algorithm or methodology, you can calculate different functions and not simply say that the rain is falling ...
Any idea? 've seen a few posts in some forums that can do for me?
Any help is greatly appreciated ... :-)
|
|
|
|
|
7
|
Using Arduino / Networking, Protocols, and Devices / May indicate a problem with BMP085 + RTC with I2C and sending data to COSM.COM
|
on: December 08, 2012, 09:52:30 am
|
|
after several tests by sending data to the platform COSM.COM I discovered a possible problem with the two sensors connected in I2C namely: 1 RTC + 1 BMP085 causing a block after several hours of arduino. on run the test ... code done with random numbers seems to work ... cosm respond and forward the data it locks... so I connected one by one sensor, it seems that also works with the DHT22 sensor connected ... but it crashes (with different timing) when I insert the RTC and the barometer BMP085 connected to the i2c. sensors are also connected to a logic level converter sparkun so in theory should not give big problems ... I groped to turn off after wire.begin () pull up the interior door SCL and SDA, but you is one thing to do with a logic level converter connected between the two sensors (RTC 5V, 3.3V BMP085)?
I hope I can give you an idea of how to solve the problem ...
|
|
|
|
|
11
|
Using Arduino / Networking, Protocols, and Devices / Re: Problem with Freeduino Mega, ethernet shiled, tft ST7735 and SPI
|
on: November 11, 2012, 09:23:20 am
|
this is your code modified by myself to the test: /* Web client sketch for IDE v1.0.1 and w5100/w5200 Posted October 2012 by SurferTim */
#include <Adafruit_GFX.h> // Core graphics library #include <Adafruit_ST7735.h> // Hardware-specific library #include <SPI.h> #include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; IPAddress ip(192,168,1,20); IPAddress gateway(192, 168, 1, 1); IPAddress subnet(255, 255, 255, 0); IPAddress server(74,125,227,16); // Google //IPAddress server(173,194,35,191); // Google
EthernetClient client; int totalCount = 0; int loopCount = 0; char pageAdd[32]; // Define pins and Libraries of TFT LCD 1.8" //#define sclk 13 //#define mosi 11 #define ss1 7 #define dc 9 #define rst -1 // you can also connect this to the Arduino reset Adafruit_ST7735 tft = Adafruit_ST7735(ss1, dc, rst); int i = 1; void setup() { Serial.begin(9600); // disable TFT SPI pinMode(7,OUTPUT); digitalWrite(7,HIGH); // disable SD SPI pinMode(4,OUTPUT); digitalWrite(4,HIGH);
// Start ethernet Serial.println("Starting ethernet..."); Ethernet.begin(mac, ip, gateway, gateway, subnet);
// If using dhcp, comment out the line above // and uncomment the next 2 lines
// if(!Ethernet.begin(mac)) Serial.println("failed"); // else Serial.println("ok");
Serial.println(Ethernet.localIP());
delay(2000); Serial.println("Ready"); tft.initR(INITR_REDTAB); // initialize a ST7735R chip, red tab }
void loop() { digitalWrite(10, LOW); if(loopCount < 30) { // if loopCount is less than 30, just delay a second delay(1000); } else { // every thirty seconds this runs loopCount = 0;
// Modify next line to load different page // or pass values to server sprintf(pageAdd,"/",totalCount);
// sprintf(pageAdd,"/arduino.php?test=%u",totalCount);
if(!getPage(server,pageAdd)) Serial.print("Fail "); else Serial.print("Pass "); totalCount++; Serial.println(totalCount,DEC); }
loopCount++; }
byte getPage(IPAddress ipBuf,char *page) { int inChar; char outBuf[128];
Serial.print("connecting...");
if(client.connect(ipBuf,80)) { Serial.println("connected");
sprintf(outBuf,"GET %s HTTP/1.0\r\n\r\n",page); client.write(outBuf); } else { Serial.println("failed"); return 0; }
// connectLoop controls the hardware fail timeout int connectLoop = 0;
while(client.connected()) { while(client.available()) { inChar = client.read(); Serial.write(inChar); // set connectLoop to zero if a packet arrives connectLoop = 0; }
connectLoop++;
// if more than 10000 milliseconds since the last packet if(connectLoop > 10000) { // then close the connection from this end. Serial.println(); Serial.println("Timeout"); client.stop(); } // this is a delay for the connectLoop timing delay(1); }
Serial.println();
Serial.println("disconnecting."); // close client end client.stop(); digitalWrite(10,HIGH); digitalWrite(7, LOW); tft.setTextWrap(true); tft.fillScreen(ST7735_BLACK); tft.setCursor(0, 5); tft.setTextColor(ST7735_WHITE); tft.setTextSize(1);
tft.setTextColor(ST7735_GREEN); tft.println(" Weather Station"); tft.println(" Fabro1"); Serial.print(i++); tft.println(i++); digitalWrite(7,HIGH); return 1; }
|
|
|
|
|
12
|
Using Arduino / Networking, Protocols, and Devices / Re: Problem with Freeduino Mega, ethernet shiled, tft ST7735 and SPI
|
on: November 11, 2012, 09:18:19 am
|
|
thanks for the test code. this I have slightly modified your code to test the ethernet shield combined with the ST7735 tft looks like it works. I left arduino work for two hours and you are not stuck - it the ethernet shield nor the ST7735. but then where is the problem of the blocks and no views of my code? any ideas? I entered the CS in the ST7735 PIN 7, to help organize the wiring. you think may be the sensors that stop? however, if not the whole code for the ethernet shield everything works fine. The project consists of: - 1 Freeduino Mega 2560 - 1 ethernet shield - 1 sensor BMP085 on i2c 3V - 1 converter logic level hardware - 1 RTC to keep time on i2c 5V - 1 DHT22 5V on pin 14 - 1 PIR switch dell'ST7735 or to display data in the presence of humans (but still connected in breadborad to write the code).
If you want to send you detail photos of the project.
|
|
|
|
|
13
|
Using Arduino / Networking, Protocols, and Devices / Re: Problem with Freeduino Mega, ethernet shiled, tft ST7735 and SPI
|
on: November 10, 2012, 09:29:59 am
|
|
It all works separately with the same PIN and with the same cables DuPoint, the TFT turns on but nothing is displayed, white screen, then the ethernet shield hangs. tried to debug the code with the Serial.print but also locks the serial monitor. SD card is a memory card 2GB but not used. yet at least in this part of the code. however, or even tried to remove it but arduino crashes too ...
|
|
|
|
|