Avatar for countxerox

countxerox

Member since Feb 2016 • Last active Oct 2017
  • 6 conversations
  • 45 comments

I'm an Aerospace Engineer from Cambridge and I'm learning JavaScript as a hobby.

Most recent activity

  • in Projects
    Avatar for countxerox

    I tried a similar sort of thing using a multi-pole switch, I switched the ground wires as well, it worked but there was a flash and the image was distorted momentarily after switching, the image kind of wobbled and vibrated for a second or two. Then the image was ok, there was no noise after the image had settled down but it didn't seem like it was doing the monitor any good so I used to turn the monitor off during switching as a precaution.
    I suppose the electro-magnetic coil in the relay would interfere with the signal wire, could you wire it so the signal wire uses the normally closed position so the relay is not energised when the signal is connected?

  • in Electronics
    Avatar for countxerox

    Hi furuskog,

    You could make a simple soil moisture sensor using two wires stuck in the soil and connected to 3.3v and A7, then just measure the voltage at A7 by doing something like..

    var n=0,i=100;
    while (i--) n+=analogRead(A7);
    

    Then you can log the data from your soil meter and any other sensors in a google spreadsheet like this example http://www.espruino.com/Logging+to+Googl­e+Sheets

    You could handle the alerts from google sheets as the there are add-ons which can email you etc

    I made a similar garden thing which has sensors for light intensity, temperature, humidity and soil moisture http://forum.espruino.com/conversations/­302202/

    Hope that helps
    Rob

  • in Puck.js
    Avatar for countxerox

    I found the accuracy to the more like +/- 10m but this was with cheap copies of the neo-m8 off ebay but I did get some really good results (+/- 1m) using the same gps modules with rtklib.

  • in Pico / Wifi / Original Espruino
    Avatar for countxerox

    Yes, two typos there. I do mean CH_PD and it's hardwired to VCC with a 10k resistor (not 1k). GPIO0 and GPIO2 are disconnected. GPIO15 is hardwired to GND with a 10k resistor.

    It does seem to me like it should work since when I pull CH_PD to GND or VCC manually with a wire everything works as expected i.e. when CH_PD is connected to GND the ESP8266 powers down and when connected to VCC it powers up.

  • in Pico / Wifi / Original Espruino
    Avatar for countxerox

    Here's a picture of it

  • in Pico / Wifi / Original Espruino
    Avatar for countxerox

    Hi, I want to turn my ESP8266 off to save power.

    When I try to pulling the CH_PIN pin high with digitalWrite(B9,1) it doesn't power up and I see Uncaught No 'ready' after AT+RST.

    I tried using a timeout to give it some time to boot up and also tried pulsing the reset pin.

    Also it seems my ESP8266 board has the CH_PD pin hardwired to Vcc via a 1k resistor. If I connect the CH_PD pin to GND, it powers down and if I connect it to the Picos 3.3v pin or leave it dangling it powers up.

    • 12 comments
    • 367 views
  • in JavaScript
    Avatar for countxerox

    Thanks for that advice @oesterle. I've had a go and I think it's improved but I can't close the wifi connection. wifi.disconnect() isn't recognised.

    Serial1.setup(115200, { rx: B7, tx : B6 });
    
    I2C3.setup({sda:B4,scl:A8});
    var bh=require("BH1750").connect(I2C3);
    
    var dht = require("DHT11").connect(B5);
    
    function read_sensors(callback) {
      var n=0,i=100;
      while (i--) n+=analogRead(A7);
      bh.start(3);
      light_intensity = Math.round(bh.read()).toString();
      soil_moisture = (100-Math.round(n)).toString();
      dht.read(function (a) { 
        temp = a.temp.toString();
        humidity = a.rh.toString();
        callback (light_intensity, soil_moisture, temp, humidity);
      });
    }
    
    function send(l,m,t,h) {
      wifi = require("ESP8266WiFi_0v25").connect(Seri­al1, function(err) {  
        if (err) throw err;
        wifi.connect("Xxx", "xxx", function(err) {
          if (err) throw err;
          LED2.set();
          sendForm(l,m,t,h);
        });
      });
    }
    
    function onInit() {
      USB.setConsole(1);
      clearInterval();
      setInterval(function() {
        read_sensors(send);
      },30000);
    }
    
Actions