Thank you Corbin and NCA78, I had assumed it was my code since I am not very good at it. However it turned out to be a bad sensor. I will post some additional information and pictures in the project section this evening now that everything is working. Thank you again for your help.
Posts made by ajachierno
-
RE: Garden light, humidity, temperature monitor with working SHT10 sensor 99% done and I need your help!
-
Garden light, humidity, temperature monitor with working SHT10 sensor 99% done and I need your help!
Hi everyone I am working on my latest project a garden soil humidity/temperature monitor and light sensor. The problem is I am stuck. I got the SHT10 sensor working flawlessly to report the soil humidity and temperature but the light sensor seems to report once when powered up then never again. Also it always seems to be the same value regardless of light conditions (54612 ). I am thinking my sketch is wrong as I am not the best programmer can some one check it for me please and tell me where i went wrong. Also photos of the project attached. at the bottom
#include <SPI.h>
#include <MySensor.h>
#include "SHT1x.h"
#include <BH1750.h>
#include <Wire.h>
#define CHILD_ID_HUM 0
#define CHILD_ID_TEMP 1
#define CHILD_ID_LIGHT 2
#define dataPin 6
#define sckPin 7 //serial clockunsigned long SLEEP_TIME = 30000;
SHT1x th_sensor(dataPin, sckPin);
float lastTemp;
float lastHum;
BH1750 lightSensor;
MySensor gw;
MyMessage msgHum(CHILD_ID_HUM, V_HUM);
MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
MyMessage msg(CHILD_ID_LIGHT, V_LIGHT_LEVEL);
boolean metric = true;
uint16_t lastlux;
void setup()
{
gw.begin();// Send the Sketch Version Information to the Gateway
gw.sendSketchInfo("Humidity", "1.0");
gw.sendSketchInfo("Light Lux Sensor", "1.0");// Register all sensors to gw (they will be created as child devices)
gw.present(CHILD_ID_HUM, S_HUM);
gw.present(CHILD_ID_TEMP, S_TEMP);
gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
lightSensor.begin();
metric = gw.getConfig().isMetric;
}void loop()
{float temperature = th_sensor.readTemperatureF();
if (isnan(temperature)) {
Serial.println("Failed reading temperature");
} else if (temperature != lastTemp) {
lastTemp = temperature;
if (!metric) {
temperature = th_sensor.readTemperatureC();
}
gw.send(msgTemp.set(temperature, 1));
Serial.print("T: ");
Serial.println(temperature);
}float humidity = th_sensor.readHumidity();
if (isnan(humidity)) {
Serial.println("Failed reading humidity");
} else if (humidity != lastHum) {
lastHum = humidity;
gw.send(msgHum.set(humidity, 1));
Serial.print("H: ");
Serial.println(humidity);
}
uint16_t lux = lightSensor.readLightLevel();// Get Lux value
Serial.println(lux);
if (lux != lastlux) {
gw.send(msg.set(lux));
lastlux = lux;
}gw.sleep(SLEEP_TIME); //sleep a bit
}
[URL=http://s1074.photobucket.com/user/ajachierno/media/20160719_1810421_zpsg1gccgpd.jpg.html][IMG]http://i1074.photobucket.com/albums/w405/ajachierno/20160719_1810421_zpsg1gccgpd.jpg[/IMG][/URL]
[URL=http://s1074.photobucket.com/user/ajachierno/media/20160719_1810321_zpsa9tm5mp4.jpg.html][IMG]http://i1074.photobucket.com/albums/w405/ajachierno/20160719_1810321_zpsa9tm5mp4.jpg[/IMG][/URL]
[URL=http://s1074.photobucket.com/user/ajachierno/media/20160719_1659381_zpsmaqne2x9.jpg.html][IMG]http://i1074.photobucket.com/albums/w405/ajachierno/20160719_1659381_zpsmaqne2x9.jpg[/IMG][/URL]
[URL=http://s1074.photobucket.com/user/ajachierno/media/20160719_1657091_zpscjtpxuiu.jpg.html][IMG]http://i1074.photobucket.com/albums/w405/ajachierno/20160719_1657091_zpscjtpxuiu.jpg[/IMG][/URL]
-
RE: Car remote start with Amazon Echo, Homeseer, and My Sensors hardware
Its funny you say that someone apparently cracked my homeseer account today started the car a couple times as well as running a few other events. Honestly I just used the default sketch not to worried about the security aspect since it is a factory system its not possible to shift out of park or use the accelerator without first inserting the Key. I figure worst case someone runs the car all night and drains the gas. Although its funny whoever broke in obviously thought setting the locks to off unlocks the car which is not the case and why i intentionally did not wire the unlock button.
-
RE: Car remote start with Amazon Echo, Homeseer, and My Sensors hardware
Its actually a factory remote start. The same thing could be done with aftermarket units though. Below is a picture of the unmodified remote. Basically to start the car you just held the lock button for 5 seconds or so then pressed the top button on the remote to start the car. Same thing being done now just with relays instead of physical presses.
-
Car remote start with Amazon Echo, Homeseer, and My Sensors hardware
Video Below Thought I would share this, using the Amazon Echo to control homeseer and the My Sensors plugin/hardware I was able to start my car. I still need to build sometime of safety device to prevent anyone from starting it while its in the garage, but I have some time to work on that part. The Low Quality is on purpose to blur the license plate (sorry but dont need to be publishing that).
How it was done, basically I ordered a spare remote synced it to the car then removed the buttons and wired some solid state relays in their place. Then I created an event in homeseer to press the lock button for a set period of time, stop for a second then press the start button. The panic button is also hooked up to a relay and will be linked to the alarm. Note that I did not hook up the unlock button as I was afraid of security issues.
Remote start car using Amazon Echo, homeseer, and My sensors – 00:27
— AJ A -
Request RGB control
Would be nice if there was a simple RGB controller, it doesn't seem like it would be that difficult to implement.
-
RE: Case for Scene Controller
You can see how I am using the foam to get a tight fit. I was planning to change that but to be honest it has worked really well may leave that as is.
-
Case for Scene Controller
I have been trying to develop a case for the scene controller. this is what I have come up with so far. This is a working prototype as I do plan to make changes in the distant future.
-
relay with button problem?
I am trying to get a simple relay with button setup going using the code from the example. Having one problem I am not even sure how to begin troubleshooting. The button is working and I can see the status in my Vera which changes with when i push the button. I am however unable to toggle the status from the vera I push the button but nothing seems to change I do not get any transmit message like normal. Any ideas? Thanks.
-
RE: Reusing arduinos?
I have no idea why but I was able to reuse 2 of my 4 boards like this no idea what changed or why. May just need to give it time?
-
RE: Reusing arduinos?
Nope tried that once before, and just now 2 more times.
-
RE: Reusing arduinos?
I am using a serial gateway on a vera 3 controller, everything works fine with new arduinos just not anything i used before. I just tried to clear the eprom again and still not working
-
Reusing arduinos?
I am having an issue reusing any ardionos that were previously networked on the system (and deleted). I have tried clearing the eprom on both the gateway and the units I am trying to reuse and that doesn't seem to work. I am unable to add them when i start inclusion they are never found. Does anyone know how to fix this?
-
Pro Micro?
So I intended to buy a couple Pro Mini boards for some projects I accidentally ordered some Pro Micro boards instead. Does anyone know if these will work? The pinout on these is pretty different. really what I need help with is how to connect the radio. Power and ground are pretty obvious. I googled it and found that pin 14 is the miso, pin 16 is the mosi, and pin 15 is the sclk.. Assuming this will even work that leaves me with three pins to figure out, the IRQ, CE, and CSN/CS pins? Does anyone have experience with this?
-
RE: Humidity example sketch not working
I am running straight off the webpage. Actually it doesnt apear I can get any of the sketches to run using either the browser plg in or the native IDE.... wishing I hadnt updated since this last set of changes.
-
RE: Humidity example sketch not working
yes, also I have actually been trying to run it using codebender and didn't work there so then I did try doing it in the native IDE and still not working. My understanding is codebender has all the libraries built in so I am thinking it isn't a library issue, although like I said new at this so may be wrong
-
Humidity example sketch not working
I am getting an error when I try and run the example humidity sketch. Error details below
HumiditySensor copy copy copy.ino:11:5: error: no matching constructor for initialization of 'DHT'
DHT dht;
^
libraries/DHT/DHT.h:32:3: note: candidate constructor not viable: requires at least 2 arguments, but 0 were provided
DHT(uint8_t pin, uint8_t type, uint8_t count=6);
^
libraries/DHT/DHT.h:23:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
class DHT {
^
1 error generated.Any one have any ideas? Pretty new to this.