Avatar for AlexOwen

AlexOwen

Member since May 2015 • Last active Jun 2016
  • 8 conversations
  • 36 comments

Most recent activity

  • in ESP8266
    Avatar for AlexOwen

    Thanks for that, I've spliced in power every 90 lights and it seems to be holding up well, but I have yet to try to animate it.

  • in ESP8266
    Avatar for AlexOwen

    It was a hardware problem... I was using zener diodes every 50 or so to try to reduce the risk of ESD, but it was disrupting the signal.

  • in ESP8266
    Avatar for AlexOwen

    Hi,

    I'm trying to connect 330 WS2812B LEDs to an ESP8266, using neopixelWrite. However it doesn't seem to work above around 200 LEDs, it starts behaving oddly and turning off earlier LEDs. It looks like it might be an overflow error, could that be possible?

    I'm testing it with a really long array, which could also be the problem if Espruino has a maximum array length.

    Thanks!

  • in Electronics
    Avatar for AlexOwen

    Is it possible to read an entire port (e.g. PA0 to PA15) at once? In C it's possible, and a lot quicker than reading each pin individually. Or is this how Espruino already works when reading multiple pins?

    Thanks!

    • 19 comments
    • 772 views
  • in Projects
    Avatar for AlexOwen

    @MaBe it would seem I included the access point creation after all, I think it must have just about fitted after the increase from 1200 to 1400 jsvars on the ESP8266. The code runs from line 7 in ub.wifi.js and is called if the device fails to connect to the hard coded access point 5 times in a row. It'll create an AP which has a name the same as the ID of the device.

    Currently you have to connect to the AP it creates, go to the IP for the device, and enter (in plain text (unfortunately) the new AP and password. It should save the new AP and password once you've submitted them on the page, but it won't survive a reboot.

    However, in my tests I can't seem to connect to the AP of the ESP8266 once it's created. I don't know if it's a bug in the code or the hardware misbehaving, or (less likely) a bug in Espruino.

  • in Projects
    Avatar for AlexOwen

    @MaBe, I'll get it up once I have a chance to test it and see if it fits with the new build. If it doesn't I'll PM the changes to you so you can give it a shot yourself.

    @the1laz, thanks, CSS(D) is a WIP for sure, but hopefully it's useful. I've looked at Node-RED a while ago, but it seems to have come on a lot since then. Thanks for the suggestion, I'll take another look.

    If you end up using ub then please let me know, and also if you decide not to for any reason (even if it's one I can't fix. Any feedback will help immensely with my PhD (which is what this is largely in aid of at the moment).

    @DrAzzy, it's like @the1laz said, it's designed to hopefully make things a bit simpler after the initial deployment while still retaining the ability to script everything to the minutest detail if you want to. It's also looking forward to when there are potentially hundreds of connected devices in an environment, in which case controlling them from a webpage becomes cumbersome. Instead you can control sets of devices which you can define using CSS selectors, which are already pretty standard.

    It's also about integrating with the Web, so in your example you've created a resource (launch.cmd) behind a URI, which works for direct control, but with CSS(D) and ub you don't need to know that the resource exists. You can send a command to an environment and anything that understands it will respond and react. It's a loose vs strong coupling thing.

    You can also easily to M2M so you never need to interact with the system at all.

    An example of where it's good is one I have working in my room as we speak. I have a Web page where I can set a temperature range, then when the temperature drops below the lower limit, anything that has the 'heater' class turns on and warms the room up until it reaches the upper limit, then turns off. Because the devices are stored as DOM objects it's easy to add a CSS(D) property to say, for example, how powerful each heater is (e.g. power: 3000w). Then if I want to keep my energy usage below a certain level I can only turn on anything that has a 'heater' class and has a power level below 2 kilowatts.

    However this also highlights one of the things that needs to be worked out with CSS(D), which is when I use the 'power' attribute do I mean on/off or a power rating, and can some objects be half on. As I said it's a WIP and any contributions to the code or design choices are greatly appreciated.

Actions