Avatar for Mudderman


Member since Dec 2013 • Last active Feb 2014
  • 2 conversations

Most recent activity

  • in General
    Avatar for Mudderman

    I have the 3.2" version and I have no real problems. Had some inital flashing problems, but they were related to my laptop and not the card itself apparently. Haven't tried anything with the sdcard or rtc (it came without a battery for this and I haven't had time ti fix one yet), but the LCD works just fine. It's usper easy to draw and write stuf on it. The touch callback stuff feels a bit wonky to me, but I just use the example Gordon has on the page and that works sufficiently enough for my uses.

  • in General
    Avatar for Mudderman

    In theory, yes! I bought them at a cheap store here in Sweden quite some time ago so do't have a link for them, sorry. They are just some "noname" super cheap versions.

    I noticed the spam in the receiver as well, haven't gotten that far yet though, got stuck experimenting with a gui on the touchscreen :)

  • in General
    Avatar for Mudderman

    Sure. A tiny disclaimer though, I don't know anything about this, I'm learning about microcontrollers as I go ;) Therefore, I might use the wrong terminology :)

    My board is the HYSTM32 3.2". It's currently running the 1v41 of Espruino (if that matters).
    I have two separate modules for RF signals, one receiver and one transmitter. Sorry for these links leading to a swedish shop, they can probably be found in other online stores as well (probably cheaper too).

    Any way.

    I soldered some headers onto my board so that I easily can connect and disconnect stuff while learning about these things. I tried connecting the modules using a breadboard, but the antenna pin seems to act up when doing so. So I just use male-female connector wires from the transmitter into the board. Connected ground and power (3v3) and the data pin to A2.

    I had found examples online to receive and transmit rf signals, but they were either for arduino or for raspberry pi. I ended up using the rc-switch library as a base.

    The example TypeA_WithDIPSwitches_Lightweight seemed to be the easiest way to start. My cheap RF-plugs is using this setup, 5dip on the remote and 2x5 dip on the plug. This example is more or less directly translatable into Espruino. Though I tweaked it a little bit:

    var thePin = A2;
    function send(numberHigh, numberLow) {
      digitalPulse(thePin, 1, 0.35 * numberHigh);
      digitalPulse(thePin, 0, 0.35 * numberLow);
    function sendCode(code) {
      for (repeat=0; repeat < 6; repeat++) {
        for (i=4; i < 16; i++) {
          send(1, 3);
          if (((code << (i-4)) & 2048) > 0) {
            send(1, 3);
          } else {
            send(3, 1);
    function on() {
    function off() {

    As my plugs and remote is set with the following system code:

    1   2    3   4    5
    on  off  on  off  on

    and the plug in the above code has the following dips set:

    a    b    c    d    e
    off  on   off  off  off

    I therefore use the code 1010101000 and append 10 for turning on and 01 for turning off.

    Theres a pretty good explanation on the rc-switch wikipages for how these plugs operate.

    My next goal is to port the receiving code so that my rf-receiver can react to the remote that comes along with the plugs.

  • in General
    Avatar for Mudderman

    Awesome! Worked like a charm! Thank you!

    Now I can toggle an RF-controlled light switch using my HY board and Espruino \o/

  • in General
    Avatar for Mudderman

    I've been "porting" an Arduino code example and been successfully converting it so far (not much to change other than removing the datatypes) and the code uses delayMicroseconds. Is there a similar way to achieve this in Espruino?

    The code is basically:

    method() {
      digitalWrite(pin, 1);
      digitalWrite(pin, 0);
  • in General
    Avatar for Mudderman

    Well...would be so bold as to call my mac "new", but thanks ;)

    I figured as much. When I first connected the card my MBP would even recognize the card as a usb device (in either of the mini-usb ports), googled it and found someone with similar problems which led me to the Prolific drivers and installed them. After that there was a /dev/tty.usbserial but only if I connected it to the mini-usb by the power led not the other one. But flashing failed and gave some random error messages as seen by my previous posts.

    After flashing the card on my ubuntu machine (thank god I saved it in my closet) my MBP has no problem finding it and connecting to it on either mini-usb port.

  • in General
    Avatar for Mudderman

    Managed to find my old linux computer and it worked like a charm! Thanks! I'm so looking forward to getting started using espruino now! Keep up the awesome work!

  • in General
    Avatar for Mudderman

    I've also gotten:

    Reading data from espruino_1v41_hystm32_32_vc.bin
    Bootloader version 0x22
    Chip id 0x414, STM32F1, performance, high-density
    Writing 208084 bytes to start address 0x8000000
    Write 256 bytes at 0x8000000
    Traceback (most recent call last):
      File "stm32loader.py", line 513, in 
        cmd.writeMemory(conf['address'], data)
      File "stm32loader.py", line 348, in writeMemory
        self.cmdWriteMemory(addr, data[offs:offs+256])
      File "stm32loader.py", line 221, in cmdWriteMemory
        self._wait_for_ack("0x31 programming failed")
      File "stm32loader.py", line 87, in _wait_for_ack
        raise CmdException("No response to %s" % info)
    __main__.CmdException: No response to 0x31 programming failed