Avatar for sammachin

sammachin

Member since Nov 2016 • Last active Jul 2019
  • 5 conversations
  • 17 comments

Most recent activity

    • 6 comments
    • 70 views
  • in Puck.js, Pixl.js and MDBT42
    Avatar for sammachin

    Tired the 5 red flash reset and rebooting the mac, still the same issue!

    All very strange, tried with a brand new puck and that seems to work fine?!?!?!

    I'm gonna try and get along to JSOxford next week if I can so I'll try and remember to bring it with me, perhaps you can spot something thats odd with it I'm missing

  • in Puck.js, Pixl.js and MDBT42
    Avatar for sammachin

    its certainly possible I had been messing around with bluetooth on the puck previously but I would have imaginged a hard reset and a firmware update via DFU would get rid of any of that?

    also it works on the macbook which has me even more lost!

    Any suggestions on where in the mac to reset the pairing, none of the espruino devices show up in the regular bluetooth settings app

  • in Puck.js, Pixl.js and MDBT42
    Avatar for sammachin

    Got a slightly weird problem, dig out one of my pucks as I have a project idea, trying to connect it to my iMac to use the web IDE but when I scan for webbluetooth devices it sees the same puck name twice (with different ?MAC? addresses?
    No matter which one I select it fails to connect
    I've tried updating the fw to 2.04 and doing a hard reset neither of which helped.
    I can connect my pixl to the iMac fine
    I can connect this puck to my Macbook fine (it only shows up once there)
    See screenshots for the details,

    I'm a bit lost!

  • in Interfacing
    Avatar for sammachin

    @Robin

    Sorry I should have clarified I'm currently testing on my bench with the sensor hooked up to an LED an button that I can pulse manually to test the detection, thats the part thats unreliable,

    The code for counting and datetime works well if I use the button to trigger the function instead of my sensor.

    I think you might be onto somthing with the voltage levels though I'd not realised the pullup resistor is 40k I need to go and do my calculations properly :)

  • in Interfacing
    Avatar for sammachin

    I'm trying to use an esprunio (pico) to interface some utility neter LED pulse counters (http://www.crucible-technologies.co.uk/p­roducts/WEB_LPS) these attach to the front of my electricity meter(s) over the LED which pules every 0.001 kWh of energy thats used.

    The idea is to count the pulses each minute then output this over the usb prot to a host raspi for logging the data.

    I've prototyped it with the button and the pulse counting works well, the issue I'm having is with the interfacing of the sensors to the digital input pins on the pico, I have the 2 wire passive sensors and according to their info Every time the LED on an energy meter pulses, the resistance between the signal and ground connections drops to around 2k ohm so if I connect the sensor across GND and D0 on the pico then use the internal pullup resistor I should get a 0 when the LED is on (or use the rising edge of the set watch to detect when the LED goes out. however I'm seeing very unreliable results.

    My code is below

    var count = {};
    clearWatch();
    const sensor =D0;
    
    pinMode(sensor, 'input_pullup');
    
    
    function printoutput(){
      console.log("---------------------------­--");
      for (var property in count) {
        if (count.hasOwnProperty(property)) {
          console.log(property + " - " + count[property]);
        }
      }
    }
    
    function jsonoutput(){
      console.log(JSON.stringify(count));
    }
    
    function reset(){
      count = {};
    }
    
    setWatch(function() {
      var dta = new Date().toString().split(":");
      dta.pop();
      var dt = dta.join(":");
      if (count[dt]){
        count[dt] +=1;
      } else {
        count[dt] = 1;
      }
    }, sensor, {edge:"rising", debounce:50, repeat:true});
    
  • in ESP32
    Avatar for sammachin

    Thanks,

    Yeah I've marked the node-red hub to look at as I've been doing a load of development with NR recently so thats something to play with :)

    The intended use for the AWS-IoT though won't really make Puck&Pi a go-er for production use, might be fine for a quick prototype

  • in ESP32
    Avatar for sammachin

    Just bumping this in case anyone made any progress?
    I'm hoping to use with with either a Puck (and some sort of BLE<>IP bridge) or an Esprunio WiFi

Actions