×

SparkFun will be closed Nov 26th and 27th for the Thanksgiving holiday. Orders placed after 2:00pm MT on the 25th will ship out Monday the 30th.

# TyTower

Member Since: October 8, 2009

Country: Australia

• Bit of wire in matchheads and connect 12 V and you have the same result. Ban all wire export -oh and matches too

• Silicon Nitride Igniter - 12V In stock COM-11694

So why? Whats so special about these that you can’t ship them overseas . A few bits of wire and some ceramic for gods sake . You Yanks carry on about nothing

• I have put this post on ESP8266 Forum with full credits , In the Wiki page -Hope this is OK -email me if not I’m in your buyer database

I put an LED on one of the GPIO pins and code it to flash 4 times on startup or continual on error which is OK unless you are short on pins . Is your code available? Mine is here for ESP8266 ESP12 board to Sparkfun data Thanks Jimbo

• Use as said above like an LED on the DC side . Thats what it is!

• I might add 240 Volts times square root of 2 equals 340 volts but the peak to peak is twice that or 679 Volts –80 volts over the rating?

• So from https://en.wikipedia.org/wiki/Root_mean_square A similar analysis leads to the analogous equation for sinusoidal voltage:

V_{\mathrm{RMS}} = {V_\mathrm{p} \over {\sqrt 2}}.

Where IP represents the peak current and VP represents the peak voltage.

Because of their usefulness in carrying out power calculations, listed voltages for power outlets, e.g. 120 V (USA) or 230 V (Europe), are almost always quoted in RMS values, and not peak values. Peak values can be calculated from RMS values from the above formula, which implies Vp = VRMS × √2, assuming the source is a pure sine wave. Thus the peak value of the mains voltage in the USA is about 120 × √2, or about 170 volts. The peak-to-peak voltage, being twice this, is about 340 volts. A similar calculation indicates that the peak-to-peak mains voltage in Europe is about 650 volts."

So these are not good for 240 Volts like we have in Australia as the peak to peak voltage can be 650 Volts

Will you comment then on who or what is right for RMS 240 Volts ?

• What intrigues me is that moon planting and vine cutting supposedly give best results . Now if its so hard to sense these light levels electronically then what chance the plant even notices this . I’m working on the same area as you but I’m a bit behind you I think . If I get anything going I will post back here.

• Hm I don’t like the look of that but maybe you can copy it to an editor and make sense of it . I think its all there in one form or another?

• I finally got a stream up and working . It took a bit but its for the first Ethernet shield here using the DHT library which covers 3 or 4 different types of sensors (see inside the library). Mine is the white plastic housed one RHT03 and it seems to be getting it right . Ill attach the code here too which is a bit messy and needs refining but works out of the box on that sensor.

# define DHT_PIN 2

DHT dht(DHT_PIN,DHT22);//DHT22 for my sensorRHT03-others in library

# define SPARKFUN_UPDATE_TIME 60000 //Update SparkFun data server every 60000 ms (1 minute).

unsigned long timer1 = 0; unsigned long timer2 = 0;

byte mac[] = {0x00, 0x1D, 0x09, 0x22, 0x75, 0x69}; char server[] = “data.sparkfun.com”; // name address for data.sparkFun (using DNS) // Set the static IP address to use if the DHCP fails to assign IPAddress ip(192,168,0,177); EthernetClient client;

const String publicKey = “RMzp9ANyqzfjw4drzNnZ”; const String privateKey = “lzrnDbjBprioBgD6Mlvd”; const byte NUM_FIELDS = 2; const String fieldNames[NUM_FIELDS] = {“humidity”, “temp”}; String fieldData[NUM_FIELDS]; const int triggerPin = 3; const int lightPin = A0; const int switchPin = 5; String name = “Ether-anon”; boolean newName = true;

//Character array to hold results char s[4]; //const int requestInterval = 20000; long lastAttemptTime = 0; float humidity; float temp;

void setup() { Serial.begin(115200);

setupEthernet();

// Setup Input Pins: pinMode(triggerPin, INPUT_PULLUP); pinMode(switchPin, INPUT_PULLUP); pinMode(lightPin, INPUT_PULLUP);

Serial.println(F(“=========== Ready to Stream ===========”)); Serial.println(F(“Press the button (D3) to send an update”)); Serial.println(F(“Type your name (no spaces!), followed by ‘!’ to update name”)); }

void loop() {//Update sparkfun data server every 60 seconds. // Convert each value to a string for our request to App Engine humidity = dht.readHumidity();

temp = dht.readTemperature(); //temp = (temp9/5) + 32 - 1; //To Farenheight calibrate here String temp_string = dtostrf(temp100, 4, 0, s); String humidity_string = dtostrf(humidity*100, 4, 0, s); delay(200); if(millis() > timer1 + SPARKFUN_UPDATE_TIME) { timer1 = millis(); //Update timer1 with the current time in miliseconds since startup. // Gather data: fieldData[0] = String(humidity); delay(100); fieldData[1] = String(temp); //fieldData[2] = name; delay(100); Serial.println(“Posting by timer !”); postData(); //Send data to sparkfun data server. Serial.println(“Just after timer1\n”); delay(200); }

// If the trigger pin (3) goes low, send the data.

if (!digitalRead(triggerPin)) { // Gather data: fieldData[0] = String(humidity); fieldData[1] = String(temp); //fieldData[2] = name;

Serial.println("Posting by Trigger pin!");
postData(); // the postData() function does all the work,
// check it out below.
Serial.println("Just after trigger\n");
delay(200);

}

// Check for a new name input: if (Serial.available()) { char c = Serial.read(); if (c == ‘!’) { newName = true; Serial.print(“Your name is ”); Serial.println(name); } else if (newName) { newName = false; name = “”; name += c; } else { name += c; } } }

void postData() { // Make a TCP connection to remote host if (client.connect(server, 80)) { // Post the data! Request should look a little something like: // GET /input/publicKey?private_key=privateKey&light=1024&switch=0&name=Jim HTTP/1.1\n // Host: data.sparkfun.com\n // Connection: close\n // \n client.print(“GET /input/”); client.print(publicKey); client.print(“?private_key=”); client.print(privateKey); for (int i=0; i<NUM_FIELDS; i++) { client.print(“&”); client.print(fieldNames[i]); client.print(“=”); client.print(fieldData[i]); } client.println(“ HTTP/1.1”); client.print(“Host: ”); client.println(server); client.println(“Connection: close”); client.println(); //Serial.println( fieldNames[],fieldData[]);

}

else { Serial.println(F(“Connection failed”)); }

// Check for a response from the server, and route it // out the serial port. /* delay(2000); timer2 = millis();// while((client.available() == 0)&&(millis() < timer2 + TIMEOUT)); //Wait here until server respond or timer2 expires.

// if there are incoming bytes available
// from the server, read them and print them:
while(client.available() > 0)
{

Serial.print(inData);
}
Serial.print("\n");
Serial.println("Response should be above");
Serial.println("Disconnected now");
client.stop(); //Disconnect the client from server.

*/

while (client.connected()) { if ( client.available() ) { char c = client.read(); Serial.print©; }
} Serial.println(); client.stop(); }

void setupEthernet() { Serial.println(“Setting up Ethernet…”); // start the Ethernet connection: if (Ethernet.begin(mac) == 0) { Serial.println(F(“Failed to configure Ethernet using DHCP”)); // no point in carrying on, so do nothing forevermore: // try to congifure using IP address instead of DHCP: Ethernet.begin(mac, ip); } Serial.print(“My IP address: ”); Serial.println(Ethernet.localIP()); // give the Ethernet shield a second to initialize: delay(1000); }

• It would be very helpful if you could give us a data gathering example using the DHT library for the Ethernet shield. You sell them both and I have spent 2 days trying to amalgamate the data collecting bit to the to your present example . 5 minutes for you could save weeks for us minions.

No public wish lists :(

SparkFun is an online retail store that sells the bits and pieces to make your electronics projects possible. Whether it's a robot that can cook your breakfast or a GPS cat tracking device, our products and resources are designed to make the world of electronics more accessible.

In addition to products, SparkFun also offers classes and online tutorials to help educate individuals in the wonderful world of embedded electronics.