Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. pikim
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by pikim

    • RE: Sensebender Gateway (SAMD21)

      @TimO said in Sensebender Gateway (SAMD21):

      Yes, I do have a sensebender gateway

      It's great to hear that. Given that VS Code with PlatformIO is already running:

      • install "Atmel SAM" from PlatformIO -> Home -> Platforms. Then you should have .platformio/packages/framework-arduino-samd/ in your users directory.
      • download https://github.com/mysensors/ArduinoBoards/blob/master/boards/mysensors-samd-1.0.6.tar.bz2 and unzip it
      • integrate the unzipped data from inside mysensors-samd-1.0.6 into the according folders in .platformio/packages/framework-arduino-samd/, that means
        • the content from mysensors-samd-1.0.6/bootloaders into .platformio/packages/framework-arduino-samd/bootloaders/
        • the content from mysensors-samd-1.0.6/driver into .platformio/packages/framework-arduino-samd/driver/
        • the content from mysensors-samd-1.0.6/variants into .platformio/packages/framework-arduino-samd/variants/
      • append the active part from mysensors-samd-1.0.6/boards.txt to .platformio/packages/framework-arduino-samd/boards.txt
      • create .platformio/platforms/atmelsam/boards/sensebender_gw.json. I took the mkrzero.json from that folder and adjusted it to the Sensebender. So the content of .platformio/platforms/atmelsam/boards/sensebender_gw.json is:
      {
        "build": {
          "arduino": {
              "ldscript": "flash_with_bootloader.ld"
          },
          "core": "arduino",
          "cpu": "cortex-m0plus",
          "extra_flags": "-D__SAMD21G18A__",
          "f_cpu": "48000000L",
          "hwids": [
            [
              "0x1209",
              "0x6949"
            ],
            [
              "0x1209",
              "0x6948"
            ]
          ],
          "mcu": "samd21g18a",
          "usb_product": "Sensebender Gateway",
          "variant": "mysensors_gw"
        },
        "debug": {
          "jlink_device": "ATSAMD21G18",
          "openocd_chipname": "at91samd21g18",
          "openocd_target": "at91samdXX",
          "svd_path": "ATSAMD21G18A.svd"
        },
        "frameworks": [
          "arduino"
        ],
        "name": "Sensebender Gateway",
        "upload": {
          "disable_flushing": true,
          "maximum_ram_size": 32768,
          "maximum_size": 262144,
          "native_usb": true,
          "offset_address": "0x2000",
          "protocol": "sam-ba",
          "protocols": [
            "sam-ba",
            "blackmagic",
            "jlink",
            "atmel-ice"
          ],
          "require_upload_port": true,
          "use_1200bps_touch": true,
          "wait_for_upload_port": true
        },
        "url": "https://www.arduino.cc/en/Main/ArduinoBoardMKRZero",
        "vendor": "Arduino"
      }
      

      It's not a perfect solution as it's integrated into the already existing Atmel SAM package, but it's enough for testing imo. I'l keep trying to figure out how to make a dedicated package for the Sensebender.

      It would be great if you could follow these steps and create a new project and select the sensebender as board. Please tell me whether it worked or not.

      posted in Development
      pikim
      pikim
    • RE: Support CAN transceiver benefits

      OK, thanks. I'll have a look at it.

      posted in Feature Requests
      pikim
      pikim
    • Support CAN transceiver benefits

      Hi everyone,

      I'm planning to build my first MySensors projects and I want to use CAN transceivers instead of RS485 drivers. They seem interesting to me as they offer some advantages (e.g. the lack of a DE pin, avoidance of DE stuck). Supporting another advantage would require some modification in the library and I wanted to share my thoughts and hear your opinions about that.

      CAN controllers compare each bit they send with the response they receive on the bus. If transmission and reception don't match they immediately stop sending and assume that another node is also trying to send at the same time. Of course, it is not possible to achieve this functionality on bit level using a UART interface, but in my opinion it should be possible to achieve it on byte level, at least.

      If the library compares every byte it just sent with the byte it received at the same time it should be possible to get some level of collision detection and therefore to reduce the number of collisions. One requirement would be to send a unique byte first, but afaik MySensors already does that by sending the last ID and the sender ID at the beginning. If sent and received IDs match the bus was free and transmission can continue. If the IDs don't match the bus is busy and sending must be stopped and delayed. The lower the ID the higher the priority.

      It would be great if MySensors could implement that functionality using some symbols to enable and disable it. What do you think?

      posted in Feature Requests
      pikim
      pikim