Navigation

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

    bluman

    @bluman

    2
    Reputation
    13
    Posts
    975
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    bluman Follow

    Best posts made by bluman

    • RE: Relay for PCB relay node

      @viking said:

      @johnr great idea! i have spent a few days considering this myself. Have you put any thought in to how it will be integrated to the socket? My concern is that I'd like to re-use the existing mechanical buttons in the house, connecting the arduino as a multi-way connection (swedish: trapp-koppling) to be able to use both mechanical buttons and non-mechanical. For existing multi-way connections I was thinking of adding the arduino as a "cross" (Swedish: korskoppling) in between to facilitate that but that would require two relays

      I'm working on a Distributed Arduino Node (DAN) that is designed as a "per-room" style controller using the MySensors network talking back to my Vera via serial gateway.
      Lighting and temp/humidity is currently working.
      I also plan to add Lux and infrared send/receive.

      Local control of the lighting is possible using a normal wall switch which is also wired to a relay in a "two-way" switch configuration. Like this:
      http://www.electronics-project-design.com/images/TwoWayLightSwitch.GIF

      This circuit switches power to a 12V power supply feeding into an LED dimmer/driver like this:
      http://www.aliexpress.com/item/Free-Shipping-Constant-Voltage-DMX512-0-10V-Dimming-driver-1-Channel-Single-output-DC12-24V-10A/1329369736.html
      This dimmer has a 0-10V DC input which controls the brightness of the LED lighting.
      http://en.wikipedia.org/wiki/0-10_V_lighting_control

      A rotary encoder is then mounted with the normal wall switch as a dimmer control.
      The encoder controls the Arduino's digital-to-analog converter outputting 0-5V. This output is then fed through an operational amplifier with a gain of 2, scaling the output from 0-10V. This feeds the LED dimmer/driver above and is working well with no flicker!

      Feedback is required from the 12v power supply so Vera knows if the load is either on or off as there is no way of knowing this with the two-way switching.

      This is designed for bidirectional control, from the local wall switch / rotary encoder or from the Vera for example, scene control.

      Both on/off and brightness are fed back to the Vera so the DAN and Vera status is kept in sync.

      If people are interested I am happy to post more details, sketch, Eagle schematic etc. This is still a "work in progress" though for our new home which we hope to start building this year.

      Regards
      Bluman

      posted in Hardware
      bluman
      bluman
    • Less Optimised Code for Beginners PLEASE?

      Hi there,

      Thanks to Hek, I've been having a great time with My Sensors for a while. I've just got back into it after about a 12 month break and upgrading various sensors from 1.3 to 1.4.

      I'm struggling with the new 1.4 code as the examples under the Build section use some very nice code which helps optimise the sketch size.
      This optimisation makes it more difficult to clearly understand what is happening for "beginner coders" like myself.

      I use the function incomingMessage from the relay sketch below as an example. It contains a line of code to change the relay status as commented.

       // Change relay state
       digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
      

      Trying to adapt this to work with ones own variables can be very confusing.

      Could someone please expand this out to show such code more clearly for beginners?
      It might make it easier if the expanded version of this line is shown as a comment in the code?

      This basic approach for the Build examples may help others overcome similar issues and increase the adoption of My Sensors in general.

      Regards
      Bluman

      posted in General Discussion
      bluman
      bluman

    Latest posts made by bluman

    • RE: Getting childId from IncomingMessage

      Hek,

      OK, thanks for that however it still wont compile.

      void incomingMessage(const MyMessage &message) {
      if (message.type == V_DIMMER && message.childId == 0) {

      Here is the error.

      _150309_RBG_LED_Driver.ino: In function ‘void incomingMessage(const MyMessage&)’:
      _150309_RBG_LED_Driver.ino:82:43: error: ‘const class MyMessage’ has no member named ‘childId’

      posted in Development
      bluman
      bluman
    • Getting childId from IncomingMessage

      Hi there guys,

      I'm not a coder and struggling to expand the LED dimmer example to work as a three channel RGB driver.

      Could someone please show me how to extract the childId in the message received from the gateway?

      Any help is greatly appreciated. Here is what I'm trying to do:

      void incomingMessage(const MyMessage &message) {
      if (message.type == V_DIMMER && message.childId = 0) {

      posted in Development
      bluman
      bluman
    • RE: Relay for PCB relay node

      @hek said:

      @bluman

      Candidate for the project contest perhaps?

      If all my parts turn up from China in time then it should be ready to submit for judging!

      posted in Hardware
      bluman
      bluman
    • RE: Relay for PCB relay node

      @viking said:

      @johnr great idea! i have spent a few days considering this myself. Have you put any thought in to how it will be integrated to the socket? My concern is that I'd like to re-use the existing mechanical buttons in the house, connecting the arduino as a multi-way connection (swedish: trapp-koppling) to be able to use both mechanical buttons and non-mechanical. For existing multi-way connections I was thinking of adding the arduino as a "cross" (Swedish: korskoppling) in between to facilitate that but that would require two relays

      I'm working on a Distributed Arduino Node (DAN) that is designed as a "per-room" style controller using the MySensors network talking back to my Vera via serial gateway.
      Lighting and temp/humidity is currently working.
      I also plan to add Lux and infrared send/receive.

      Local control of the lighting is possible using a normal wall switch which is also wired to a relay in a "two-way" switch configuration. Like this:
      http://www.electronics-project-design.com/images/TwoWayLightSwitch.GIF

      This circuit switches power to a 12V power supply feeding into an LED dimmer/driver like this:
      http://www.aliexpress.com/item/Free-Shipping-Constant-Voltage-DMX512-0-10V-Dimming-driver-1-Channel-Single-output-DC12-24V-10A/1329369736.html
      This dimmer has a 0-10V DC input which controls the brightness of the LED lighting.
      http://en.wikipedia.org/wiki/0-10_V_lighting_control

      A rotary encoder is then mounted with the normal wall switch as a dimmer control.
      The encoder controls the Arduino's digital-to-analog converter outputting 0-5V. This output is then fed through an operational amplifier with a gain of 2, scaling the output from 0-10V. This feeds the LED dimmer/driver above and is working well with no flicker!

      Feedback is required from the 12v power supply so Vera knows if the load is either on or off as there is no way of knowing this with the two-way switching.

      This is designed for bidirectional control, from the local wall switch / rotary encoder or from the Vera for example, scene control.

      Both on/off and brightness are fed back to the Vera so the DAN and Vera status is kept in sync.

      If people are interested I am happy to post more details, sketch, Eagle schematic etc. This is still a "work in progress" though for our new home which we hope to start building this year.

      Regards
      Bluman

      posted in Hardware
      bluman
      bluman
    • RE: Happy birthday :)

      Happy birthday Hek!

      posted in General Discussion
      bluman
      bluman
    • Less Optimised Code for Beginners PLEASE?

      Hi there,

      Thanks to Hek, I've been having a great time with My Sensors for a while. I've just got back into it after about a 12 month break and upgrading various sensors from 1.3 to 1.4.

      I'm struggling with the new 1.4 code as the examples under the Build section use some very nice code which helps optimise the sketch size.
      This optimisation makes it more difficult to clearly understand what is happening for "beginner coders" like myself.

      I use the function incomingMessage from the relay sketch below as an example. It contains a line of code to change the relay status as commented.

       // Change relay state
       digitalWrite(message.sensor-1+RELAY_1, message.getBool()?RELAY_ON:RELAY_OFF);
      

      Trying to adapt this to work with ones own variables can be very confusing.

      Could someone please expand this out to show such code more clearly for beginners?
      It might make it easier if the expanded version of this line is shown as a comment in the code?

      This basic approach for the Build examples may help others overcome similar issues and increase the adoption of My Sensors in general.

      Regards
      Bluman

      posted in General Discussion
      bluman
      bluman
    • RE: Upgrading Plugin and Libraries

      I commented out the avr/progmem.h include line and it compiled correctly and appears to be working now plugged back into the Vera USB port.

      posted in Vera
      bluman
      bluman
    • RE: File "avr/progmem.h" missing

      Sorry for the cross post as I'm asking the same question in this post here

      Can this also be commented out for the serial version of the gateway?

      bluman

      posted in Troubleshooting
      bluman
      bluman
    • RE: Upgrading Plugin and Libraries

      OK, I started from scratch by removing all library folders under the sketchbook directory and copying over from the Arduino-master/libraries folder.

      Now I just see the avr/progmem.h file missing error.

      SerialGateway.ino:31:25: fatal error: avr/progmem.h: No such file or directory
      compilation terminated.

      I noticed it is referenced to the avr directory relative to the base sketchbook directory so I searched through the entire Arduino-master folder structure and do not see this file.

      Does this need to be downloaded separately from Github or have I missed a step somewhere?

      I'm using Unbuntu 1404 with Arduino IDE 1.05+dfsg2-2.

      bluman

      posted in Vera
      bluman
      bluman
    • RE: Upgrading Plugin and Libraries

      OK, I've just uploaded the new plugin files to Vera and restarted, all appears to be working. The new format is now shown in the devices view.

      I've hit a snag when trying to compile the serial gateway sketch where it's complaining about the avr/program.h file is missing.

      avr/progmem.h: No such file or directory

      I noticed the lib directory under Arduino-Master/AVR so I attempted to copy (merge and replace) this into the sketckbook/libraries folder. Unfortunately I'm getting two additional errors relating to the RF24 and SPI libraries.

      In file included from /home/hp2540p/sketchbook/libraries/RF24/RF24.h:788:0,
      from SerialGateway.ino:26:
      /home/hp2540p/sketchbook/libraries/RF24/RF24.c:27:21: fatal error: spi/spi.h: No such file or directory
      #include <spi/spi.h>

      I'm not in a good place and need to understand the difference with these different library locations.

      If others have felt my pain, how did you resolve this issue? HELP!

      bluman

      posted in Vera
      bluman
      bluman