Navigation

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

    Posts made by gigi

    • RE: Solar Powered Mini-Weather Station

      @Petjepet I Know, thank

      on board as I did your chart

      0_1460012626053_schema-pannello-solare-2_bb-2.jpg
      Thank

      posted in My Project
      gigi
      gigi
    • RE: Solar Powered Mini-Weather Station

      @Petjepet said:

      On the green wire (light sensor?) you measure on ground where I guess you should measure between the resistor and the sensor.

      0_1460011587951_LdrUp_down.jpg

      Is the same

      0_1460011676140_vdivider.jpg

      voltage divider

      posted in My Project
      gigi
      gigi
    • RE: Solar Powered Mini-Weather Station

      0_1459971075004_schema-pannello-solare-2_bb.jpg

      New fritzing

      I have two questions?

      1. voltage divider for more 5 v (battery voltage 12-13 volts)
      2. I use a auto phone charger for step down (12v --> 5 V) - warmers if I close in a box?

      Thank

      posted in My Project
      gigi
      gigi
    • RE: Solar Powered Mini-Weather Station

      @Didi 0_1459967939633_schema-pannello-solare-2.fzz

      Fritzing File!!!!

      posted in My Project
      gigi
      gigi
    • RE: Solar Powered Mini-Weather Station

      @Dombo71 look a fritzing schematic

      posted in My Project
      gigi
      gigi
    • RE: Solar Powered Mini-Weather Station

      I purchased a solar kit

      Solar Panel
      battery 12v
      landstar solar charge controller

      I want to insert into Arduino in output of charge controller (I have 12 volts)

      to lower the voltage can I use a mobile charger Car 1 Ah

      do you heat so much?

      Thank

      @Salmoides Good Project!!!!!

      posted in My Project
      gigi
      gigi
    • RE: Solar Powered Mini-Weather Station

      This is my project!!!!

      0_1459952652761_schema-2_bb.jpg

      // Example sketch för a "light switch" where you can control light or something 
      // else from both vera and a local physical button (connected between digital
      // pin 3 and GND).
      // This node also works as a repeader for other nodes
      
      #include <MySensor.h>
      #include <SPI.h>
      #include <DHT.h> 
      
      unsigned long SLEEP_TIME = 120000; // Sleep time between reports (in milliseconds)
      
      //pin sensori
      #define PIR_PIN 2                   // The digital input you attached your motion sensor.  (Only 2 and 3 generates interrupt!)
      #define HUMIDITY_TEMPERATURE_PIN 3  // sensore temperatura umidita
      #define RELAY_PIN  4                // relay pin
      int BATTERY_SENSE_PIN = A1;         // Pin carica batteria o pannello solare
      int FOTORESIST_SENSE_PIN = A2;      // Pin fotoresistenza
      
      //interupt per sleep arduino
      #define INTERRUPT PIR_PIN-2 // Usually the interrupt = pin -2 (on uno/nano anyway)
      
      //id per vera
      #define CHILD_ID_RELE 1   // Id relay
      #define CHILD_ID_HUM 2    // id temperatura
      #define CHILD_ID_TEMP 3   // id umidita
      #define CHILD_ID_PIR 4    // Id pir
      #define CHILD_ID_LIGHT 5  // Id luminosita (fotoresistenza)
      
      //definizione per nodo vera
      #define NODE_ID 10
      #define SN "meteo station"
      #define SV "1.4"
      
      //variabili
      bool state_relay;                 //stato relay
      float batt_valore;                //dichiaro la variabile valore che memorizzerà il valore della batteria dal pin analogico
      float batt_volt;                  //volt batteria
      float batt_charged_percent;       //percentuale carica batteria
      float last_batt_charged_percent;  //percentuale carica batteria precedente
      float batt_min_voltage = 0.5;     //tensione minima batteria
      float batt_max_voltage = 5;       //tensione massima batteria
      float fotoresistenza_valore;      //dichiaro la variabile valore che memorizzerà il valore della fotoresistenza dal pin analogico
      float last_fotoresistenza_valore; //dichiaro la variabile valore precedente
      
      int lux_vera;                      //valore luminosita da inviare a vera
      
      MySensor gw;
      
      // sensore temperatura umidita
      DHT dht_int;
      float lastTemp_int = -1;
      float lastHum_int = -1;
      
      boolean metric = true; 
      
      MyMessage msgRelay(CHILD_ID_RELE,V_LIGHT);
      MyMessage msgHum(CHILD_ID_HUM, V_HUM);
      MyMessage msgTemp(CHILD_ID_TEMP, V_TEMP);
      MyMessage msgPir(CHILD_ID_PIR, V_TRIPPED);
      MyMessage msgLux(CHILD_ID_LIGHT, V_LIGHT_LEVEL);
      
      void setup()  
      {  
        gw.begin(incomingMessage, NODE_ID, false);    
        
        gw.sendSketchInfo(SN, SV); 
      
        //Sensore umidita temperatura
        dht_int.setup(HUMIDITY_TEMPERATURE_PIN);
        
        gw.present(CHILD_ID_RELE, S_LIGHT);       //light vera
        gw.present(CHILD_ID_HUM, S_HUM);          //umidity vera
        gw.present(CHILD_ID_TEMP, S_TEMP);           // temp vera
        gw.present(CHILD_ID_PIR, S_MOTION);          // motion vera
        gw.present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);  //light level (fotoresistenza)
        
        metric = gw.getConfig().isMetric;
        
        // Then set relay pins in output mode
        pinMode(RELAY_PIN, OUTPUT);   
        
        //PIR
        pinMode(PIR_PIN, INPUT);
        
        state_relay = 0;  
        //GestisciRelay();
        digitalWrite(RELAY_PIN, LOW);
        gw.send(msgRelay.set(state_relay)); 
           
      }
      
      void loop() 
      { 
          gw.process();
        
          //sensore temperatura umidita
          delay(dht_int.getMinimumSamplingPeriod());
      
          float temperature_int = dht_int.getTemperature();
          if (isnan(temperature_int)) 
          {
              lastTemp_int = -1;
              Serial.println("Failed reading temperature from DHT");
          } 
          else if (temperature_int != lastTemp_int) 
          {
            lastTemp_int = temperature_int;
            if (!metric) 
            {
              temperature_int = dht_int.toFahrenheit(temperature_int);
            }
            gw.send(msgTemp.set(temperature_int, 1));
            Serial.print("T int: ");
            Serial.println(temperature_int);
          }
        
          float humidity_int = dht_int.getHumidity();
          if (isnan(humidity_int)) 
          {
              lastHum_int = -1;
              Serial.println("Failed reading humidity from DHT");
          } 
          else if (humidity_int != lastHum_int) 
          {
              lastHum_int = humidity_int;
              gw.send(msgHum.set(humidity_int, 1));
              Serial.print("H int: ");
              Serial.println(humidity_int);
          }
          //sensore temperatura umidita
          
          //fotoresistenza    
          for(int i=0;i<150;i++)
          {
            fotoresistenza_valore += analogRead(FOTORESIST_SENSE_PIN);  //read the input voltage from battery or solar panel      
            delay(2);
          }
          fotoresistenza_valore = fotoresistenza_valore / 150;    
                 
          Serial.print ("fotoresistenza: ");
          Serial.println(fotoresistenza_valore); 
      
          if (fotoresistenza_valore != last_fotoresistenza_valore) 
          {
            lux_vera = (int) fotoresistenza_valore;
            gw.send(msgLux.set(lux_vera));
            last_fotoresistenza_valore = fotoresistenza_valore;
          }    
          //fotoresistenza
          
          //pir relay
          // Read digital motion value
          boolean tripped = digitalRead(PIR_PIN) == HIGH; 
          Serial.println("pir:");      
          Serial.println(tripped);
          gw.send(msgPir.set(tripped?"1":"0"));  // Send tripped value to gw 
          
          //accende la luce con il buio
          if (fotoresistenza_valore < 200)  //poca luce
          {
            if (tripped == 1) 
            {
               state_relay = 1;     
            }
            else
            {
               state_relay = 0;     
            }
          }
          //accende la luce con il buio
          
          GestisciRelay();
          //pir relay
          
          //battery    
          for(int i=0;i<150;i++)
          {
            batt_valore += analogRead(BATTERY_SENSE_PIN);  //read the input voltage from battery or solar panel      
            delay(2);
          }
          batt_valore = batt_valore / 150;    
                 
          Serial.print ("batt_valore: ");
          Serial.println(batt_valore);
          
          batt_volt = (batt_valore / 1024) * batt_max_voltage;
          Serial.print ("batt_volt: ");
          Serial.println(batt_volt);
          
          ////////////////////////////////////////////////
         //The map() function uses integer math so will not generate fractions
         // so I multiply battery voltage with 10 to convert float into a intiger value
         // when battery voltage is 6.0volt it is totally discharged ( 6*10 =60)
         // when battery voltage is 7.2volt it is fully charged (7.2*10=72)
         // 6.0v =0% and 7.2v =100%
         //batt_charged_percent = batt_volt*10;   
         //batt_charged_percent = map(batt_volt*10, 60 , 72, 0, 100);
          batt_charged_percent = batt_volt * 10;   
          batt_charged_percent = map(batt_volt * 10, batt_min_voltage * 10 , batt_max_voltage * 10, 0, 100);
          //batt_charged_percent = (batt_volt / batt_max_voltage) * 100;
          Serial.print ("batt_charged_percent: ");
          Serial.println(batt_charged_percent);
             
          if (last_batt_charged_percent != batt_charged_percent) 
          {
              gw.sendBatteryLevel(batt_charged_percent);
              last_batt_charged_percent = batt_charged_percent;        
          }
          //battery
          
          delay(50);
          
          // Sleep until interrupt comes in on motion sensor. Send update every two minute.   
          gw.sleep(INTERRUPT, CHANGE, SLEEP_TIME);
          
          
      } 
       
      void incomingMessage(const MyMessage &message) {
        // We only expect one type of message from controller. But we better check anyway.
        if (message.isAck()) {
           Serial.println("This is an ack from gateway");
        }
      
        if (message.type == V_LIGHT) {
           // Change relay state_relay
           state_relay = message.getBool();
           GestisciRelay();
          
           // Write some debug info
           Serial.print("Incoming change for sensor:");
           Serial.print(message.sensor);
           Serial.print(", New status: ");
           Serial.println(message.getBool());
         } 
         
        
      }
      
      
      
      void GestisciRelay()
      {
          //Serial.print(" GestisciRelay state_relay:");
          //Serial.println(state_relay);
        
          if (state_relay == 0)
          {
            digitalWrite(RELAY_PIN, LOW);
            gw.send(msgRelay.set(state_relay));
            //Serial.println("SPENTO RELAY");
          }
          else 
         {
            digitalWrite(RELAY_PIN, HIGH);
            gw.send(msgRelay.set(state_relay));
            //Serial.println("ACCESO RELAY");
         } 
      
        
      }
      
      
      

      On vera
      0_1459952879015_vera-image.jpg

      On board
      0_1459952958112_IMG_20160406_162541.jpg

      posted in My Project
      gigi
      gigi
    • RE: Merry Christmas and a Happy New 2016

      Merry Christmas

      posted in Announcements
      gigi
      gigi
    • RE: Gateway not working on VeraLite + UI6 - No Serial Port configuration available

      @cdrum I tried with many arduino nano purchased on ebay but I could not connect on vera.

      Try with gateway Ethernet !!!

      posted in Vera
      gigi
      gigi
    • RE: [security] Introducing signing support to MySensors

      @Anticimex very nice work.

      posted in Development
      gigi
      gigi
    • RE: [contest] My Gateway

      I have created a bridge for mysensors and openenergymonitor, Openenrgymonitor work whith respberry and emoncms. Whit this way I can save the data of sensor data mysensors.

      Node 7 is bridge to mysensors and RFM12B radio.
      radio transmission is point to point!!!

      posted in My Project
      gigi
      gigi
    • RE: IR Sensor

      @Terence-Faul which controller do you have?

      posted in Hardware
      gigi
      gigi
    • RE: [contest] BcSensor

      how do you make these pcb so beautiful?

      my pcb are full of wires !!!

      posted in My Project
      gigi
      gigi
    • RE: Multi Button Relay switch

      there is no problem to put 4 relays.
      you just feed a separate power!!!

      posted in Hardware
      gigi
      gigi
    • RE: Sensor to control remote controlled switches from Flamingo.eu e.g. mumbi m-FS300

      @Heinz nice project !!!

      I use VERA, I did a My Relay Module, if I push button or send command on vera, i have alwais a state of socket.

      with your system, you can know the status of the socket?

      from the photo, I dont' see a button to turn on the socket !!!! Only via remote control!!!

      gigi

      posted in My Project
      gigi
      gigi
    • RE: Small wall outlet sensor node

      @axillent
      very very cool!!

      posted in My Project
      gigi
      gigi
    • RE: External power supply to radio

      @ServiceXp said:

      I just can't believe that the display, rfm12b and NRF24 on the same 3.3v rail is under 50ma,... not too mention the other stuff on it.. You could try disconnecting everything except the NRF24 and see what happens?

      I can't even get my NRF24's to work with the shop's listed boost with the Pro Mini attached without a 'massive' capacitor.

      I tried to put a separate power supply.

      General supply 5V 2 Amps.

      I do not have the controller and I put two arduino nano for 3.3 volts

      Schema-Elettrico-Termostato-Mysensos3_bb.jpg

      after 2 hours the system crashes.

      if I put only one of the two radio system is fine.

      I tried it with a standalone with two radio but without a monitor and the system works perfectly!!!

      I have to put other capacitors?

      Thank

      posted in Hardware
      gigi
      gigi
    • RE: MyAirwik Sensor

      @gregl said:

      haha..cool.

      I bought an airwik like clone the other day, but i want to hack in a pir sensor so that it only squirts the airfreshner when movement is detected and use mysensors to count how many squirts it does....so as to know when to replace can.

      now i think about it, i should have bought one with a pir inbuilt like yours...oh well!

      pir.jpg

      watch this photo!!!

      posted in My Project
      gigi
      gigi
    • MyAirwik Sensor

      Hay!!!

      This is MyAirwik Sensor

      schema-internet_bb.png

      radio-e-sensore-di-movimento.jpg

      airwik-batterie.jpg

      schema_air-mysensors.jpg

      Voltage measured!!!
      volts.png

      airwik-mysensor-finale.jpg

      On Vera lite!!!

      vera.jpg

      Battery Version!!!!!

      posted in My Project
      gigi
      gigi
    • RE: External power supply to radio

      rsz_1imm1.jpg

      Relay on
      imm2.jpg

      Only 3.3 volt
      imm3.jpg

      I do not know if I measured correctly, and my instrument is accurate !!!!!

      posted in Hardware
      gigi
      gigi
    • RE: External power supply to radio

      @ServiceXp said:

      @gigi Wow, that's a lot of "stuff" on that 3.3v rail. I think that's your problem... What kind of current are you pulling on that rail when the radio is transmitting.?

      now I try to put the temperature sensor on the 5 volt

      arduino mega limits the current on 3.3v?

      I order AMS1117-3.3V,
      My idea:
      put the step-down input to 5V external power supply and output on 3.3 rail!!! For not use 3.3 v to MEGA

      posted in Hardware
      gigi
      gigi
    • RE: External power supply to radio

      This is the sketch arduino

      emon_mysensors.ino

      posted in Hardware
      gigi
      gigi
    • RE: External power supply to radio

      @hek said:

      I had to use a step down from 5V to get stable 3.3v power on the mega.

      unfortunately I did not step down to try!!!!

      With PC USB Arduino Mega does not start the radio.

      the system only works when I put an external power supply to VIN on Arduino Mega.

      Schema-Elettrico-Termostato-Mysensos_bb.jpg

      after 2 or 3 hours arduino crashes!!!

      posted in Hardware
      gigi
      gigi
    • RE: External power supply to radio

      @ServiceXp said:

      @gigi What kind of problems did you have when connected to the Mega's 3.3v pin?

      does not transmit the data. sketch hangs after send data

      @pete1450 said:

      No problem connecting different power supplies, but often finicky components don't like having separate grounds. Connect the ground of everything together and see how it works.

      I try tomorrow

      I will keep you updated.

      I put together a radio rfm12b, a NRF24L01 and a display 128x64

      Thank

      posted in Hardware
      gigi
      gigi
    • External power supply to radio

      I connected a display arduino mega with a NRF24L01 radio module.

      I have power problems. I would like power radio with external 3.3v power supply.

      I tried to connect 3.3 volts from a second Arduino but the radio does not work.

      someone made a separate power supply for the radio?

      Thank

      posted in Hardware
      gigi
      gigi
    • RE: Custom power meter

      @maglo18 How to transmit data to emoncms?

      posted in Troubleshooting
      gigi
      gigi
    • RE: Node to Node communication

      I made a sketch that sends a V_VAR1 from node 7 to node 8

      send sketch

      int cval_use, cval_gen;#define CHILD_ID_WATT 0
      MyMessage msgVar1(CHILD_ID_WATT,V_VAR1);
      MyMessage msgVar2(CHILD_ID_WATT,V_VAR2);

      .......

      gw.send(msgVar1.setDestination(8).set(cval_use) );
      gw.send(msgVar2.setDestination(8).set(cval_gen) );

      receive sketch

      void incomingMessage(const MyMessage &message)
      {
      // We only expect one type of message from controller. But we better check anyway.
      if (message.isAck())
      {
      Serial.println("This is an ack from gateway");
      }
      //read: 7-0-8 s=1,c=1,t=25,pt=2,l=2:486
      if (message.type==V_VAR1)
      {
      int Var1;
      Var1= atoi(message.data);
      Serial.println("#########V_VAR1#########");
      Serial.println("Var1");
      Serial.println(Var1);
      Serial.println("##########V_VAR1########");
      }
      if (message.type==V_VAR2)
      {
      int Var2;
      Var2 = atoi(message.data);
      Serial.println("########V_VAR2##########");
      Serial.println("Var2");
      Serial.println(Var2);
      Serial.println("########V_VAR2##########");
      }

      My problem:

      Var1 and var2 ia alway 0.

      send sketch serial
      send: 7-7-0-8 s=1,c=1,t=24,pt=2,l=2,st=ok:580
      send: 7-7-0-8 s=1,c=1,t=25,pt=2,l=2,st=ok:0

      receiver sketch
      ########V_VAR2##########
      read: 7-0-8 s=1,c=1,t=24,pt=2,l=2:580
      #########V_VAR1#########
      Var1: 0
      ##########V_VAR1########
      read: 7-0-8 s=1,c=1,t=25,pt=2,l=2:0
      ########V_VAR2##########
      Var2: 0
      ########V_VAR2##########

      posted in Development
      gigi
      gigi
    • RE: My Relay Module

      @Nicola-Reina Ok

      posted in My Project
      gigi
      gigi
    • RE: Custom power meter

      I have emon energymonitor but trasmission is with RFM12B radio!!!

      emonTx_V2.0 overview_0.png

      posted in Troubleshooting
      gigi
      gigi
    • Mysensors Thermostat

      I'm making a thermostat with mysensors

      define CHILD_ID_HEATER 0
      MyMessage msgHeater(CHILD_ID_HEATER, V_HEATER_SW);
      MyMessage msgTemp(CHILD_ID_HEATER, V_TEMP);
      MyMessage msgUp(CHILD_ID_HEATER, V_UP);
      MyMessage msgDown(CHILD_ID_HEATER, V_DOWN);

      void setup()
      {
      gw.begin(incomingMessage, NODE_ID, false); //nodo 6
      gw.sendSketchInfo(SN, SV);
      gw.present(CHILD_ID_HEATER, S_HEATER);
      gw.send(msgTemp.set(tempVera));
      .....

      V_HEATER_SW has the current temperature, turn off the power and heat button and two buttons + and - inside the threshold temperature

      with gw.send(msgTemp.set(tempVera)); I send temperature to vera
      with gw.send(msgHeater.set("Off"),true); and gw.send(msgHeater.set("HeatOn"),true); send to vera off ed heaton.

      My BIG problem:
      how do I send through two buttons on Arduino + and - on Vera?

      if(digitalRead(BUTTON_PIN_MENO) == HIGH)
      {
      //send - to vera
      }

      if(digitalRead(BUTTON_PIN_PIU) == HIGH)
      {
      //send + to vera
      }

      APNT-21_VERA_Scene.png

      Thank Gigi

      posted in Development
      gigi
      gigi
    • RE: My Relay Module

      @NotYetRated said:

      Very nice write up! Next add some current sensing ability to see what your load is pulling. 🙂

      A non invasive sensor would be ideal. I alredy use energimonitor for solar panels!!!!!

      posted in My Project
      gigi
      gigi
    • My Relay Module

      I started a project with Mysensors to automate some parts of my home, I made the first gateway with Arduino and an ethernet shield.

      My goal was to have a 220V controlled by Vera Lite.

      What you need:
      -Arduino Nano
      -Radio module NRF24L01 +
      -capacitors
      -resistances
      -breadboard thousand holes
      -Relay Module 10A
      -cables and plugs

      The wiring diagram.
      collegamenti-con-bottone-e1420805157407.png

      is important to the condensoatore of VCC and GND of the radio to the stability and the good reception of the same.

      Here's my self-built PCB
      2015-01-08-18.45.55-e1420805330292.jpg

      2015-01-08-18.46.41-e1420805419401.jpg

      2015-01-08-18.46.20-e1420805491322.jpg

      we put it all in a box of Gewiss 8cm x 12 cm
      2015-01-08-19.15.10-e1420805637459.jpg

      We insert the power supply
      2015-01-08-19.38.54-e1420805788700.jpg

      finally finished work:
      2015-01-08-21.34.48-e1420805899319.jpg

      Vera display
      Immagine-e1420806830432.png

      Link code

      Thanks to All

      posted in My Project
      gigi
      gigi
    • RE: $8 Lamp (Outlet) "Smart Plug" Module

      Nice project!!!

      posted in My Project
      gigi
      gigi
    • RE: Help Me!!! Hardware problem arduino uno gateway

      @kalle said:

      What is your progress? Now it works?
      It is better to use a power supply instead of USB power with the Ethernetshield.

      I put arduino and ethernet and shield directly connected with PC USB.
      Are two weeks and works without problems.

      even if the PC is powered off the USB supply current!!!!

      Merry Christmas and Happy Holidays!!!!

      posted in Hardware
      gigi
      gigi
    • RE: Help Me!!! Hardware problem arduino uno gateway

      @m26872 said:

      Did you try an external power source?
      I don't try external power source. In this moment is connect to usb cable from pc!!

      @kalle said:

      Im not sure it is a typo or you tried to ping different IP's

      In the third post you write "but no ping to 192.168.0.66" instead of 192.168.0.166 which is written in the sketch, maybe this is the problem.

      Ip is 192.168.0.166

      Thank

      posted in Hardware
      gigi
      gigi
    • RE: Help Me!!! Hardware problem arduino uno gateway

      My configuration!!!!

      circuit diagram

      collegamenti.jpg

      in RF24_config.h
      enable softspi (remove // before "#define SOFTSPI").

      change
      const uint8_t SOFT_SPI_MISO_PIN = 15;
      const uint8_t SOFT_SPI_MOSI_PIN = 14;
      const uint8_t SOFT_SPI_SCK_PIN = 16;

      arduino sketch
      /*

      • Copyright (C) 2013 Henrik Ekblad henrik.ekblad@gmail.com
      • Contribution by a-lurker
      • Contribution by Norbert Truchsess norbert.truchsess@t-online.de
      • This program is free software; you can redistribute it and/or
      • modify it under the terms of the GNU General Public License
      • version 2 as published by the Free Software Foundation.
      • DESCRIPTION
      • The EthernetGateway sends data received from sensors to the ethernet link.
      • The gateway also accepts input on ethernet interface, which is then sent out to the radio network.
      • The GW code is designed for Arduino 328p / 16MHz. ATmega168 does not have enough memory to run this program.
      • COMPILING WIZNET (W5100) ETHERNET MODULE
      • Edit RF24_config.h in (libraries\MySensors\utility) to enable softspi (remove // before "#define SOFTSPI").

      • COMPILING ENC28J60 ETHERNET MODULE
      • Use Arduino IDE 1.0.6 or 1.5.7 (or later)

      • Not compatible with Arduino IDE < 1.0.6 / 1.5.7 ! (use of EthernetClient operator ==)

      • Disable DEBUG in Sensor.h before compiling this sketch. Othervise the sketch will probably not fit in program space when downloading.

      • Remove Ethernet.h include below and include UIPEthernet.h

      • Remove DigitalIO include

      • Note that I had to disable UDP and DHCP support in uipethernet-conf.h to reduce space. (which means you have to choose a static IP for that module)
      • VERA CONFIGURATION:
      • Enter "ip-number:port" in the ip-field of the Arduino GW device. This will temporarily override any serial configuration for the Vera plugin.
      • E.g. If you want to use the defualt values in this sketch enter: 192.168.178.66:5003
      • LED purposes:
        • RX (green) - blink fast on radio message recieved. In inclusion mode will blink fast only on presentation recieved
        • TX (yellow) - blink fast on radio message transmitted. In inclusion mode will blink slowly
        • ERR (red) - fast blink on error during transmission error or recieve crc error
      • See http://www.mysensors.org/build/ethernet_gateway for wiring instructions.
      • in RF24_config.h
      • decommentare #define SOFTSPI riga 28 enable softspi (remove // before "#define SOFTSPI").
      • const uint8_t SOFT_SPI_MISO_PIN = 15;
      • const uint8_t SOFT_SPI_MOSI_PIN = 14;
      • const uint8_t SOFT_SPI_SCK_PIN = 16;
      • radio Pin
      • ARDUINO RADIO
      • pin 5 --> CE
      • pin 6 --> CSN
      • pin A0 --> MOSI
      • pin A1 --> MISO
      • pin A2 --> SCK

      */
      #include <DigitalIO.h> // This include can be removed when using UIPEthernet module
      #include <SPI.h>
      #include <MySensor.h>
      #include <MyGateway.h>
      #include <stdarg.h>
      // Use this if you have attached a Ethernet ENC28J60 shields
      //#include <UIPEthernet.h>
      // Use this fo WizNET W5100 module and Arduino Ethernet Shield
      #include <Ethernet.h>
      #define INCLUSION_MODE_TIME 1 // Number of minutes inclusion mode is enabled
      #define INCLUSION_MODE_PIN 3 // Digital pin used for inclusion mode button
      #define RADIO_CE_PIN 5 // radio chip enable
      #define RADIO_SPI_SS_PIN 6 // radio SPI serial select
      #define RADIO_ERROR_LED_PIN 7 // Error led pin
      #define RADIO_RX_LED_PIN 8 // Receive led pin
      #define RADIO_TX_LED_PIN 9 // the PCB, on board LED
      #define IP_PORT 5003 // The port you want to open
      IPAddress myIp (192, 168, 0, 166); // Configure your static ip-address here COMPILE ERROR HERE? Use Arduino IDE 1.5.7 or later!
      // The MAC address can be anything you want but should be unique on your network.
      // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
      // Note that most of the Ardunio examples use "DEAD BEEF FEED" for the MAC address.
      byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED }; // DEAD BEEF FEED
      // a R/W server on the port
      EthernetServer server = EthernetServer(IP_PORT);
      // handle to open connection
      EthernetClient client = EthernetClient();
      // No blink or button functionality. Use the vanilla constructor.
      MyGateway gw(RADIO_CE_PIN, RADIO_SPI_SS_PIN, INCLUSION_MODE_TIME);
      // Uncomment this constructor if you have leds and include button attached to your gateway
      //MyGateway gw(RADIO_CE_PIN, RADIO_SPI_SS_PIN, INCLUSION_MODE_TIME, INCLUSION_MODE_PIN, RADIO_RX_LED_PIN, RADIO_TX_LED_PIN, RADIO_ERROR_LED_PIN);
      char inputString[MAX_RECEIVE_LENGTH] = ""; // A string to hold incoming commands from serial/ethernet interface
      int inputPos = 0;
      void setup()
      {
      // Initialize gateway at maximum PA level, channel 70 and callback for write operations
      gw.begin(RF24_PA_LEVEL_GW, RF24_CHANNEL, RF24_DATARATE, writeEthernet);
      Ethernet.begin(mac, myIp);
      // give the Ethernet interface a second to initialize
      delay(1000);
      // start listening for clients
      server.begin();
      }
      // This will be called when data should be written to ethernet
      void writeEthernet(char *writeBuffer) {
      client.write(writeBuffer);
      }
      void loop()
      {
      // if an incoming client connects, there will be
      // bytes available to read via the client object
      EthernetClient newclient = server.available();
      // if a new client connects make sure to dispose any previous existing sockets
      if (newclient) {
      if (client != newclient) {
      client.stop();
      client = newclient;
      client.print(F("0;0;3;0;14;Gateway startup complete.\n"));
      }
      }
      if (client) {
      if (!client.connected()) {
      client.stop();
      // if got 1 or more bytes
      } else if (client.available()) {
      // read the bytes incoming from the client
      char inChar = client.read();
      if (inputPos<MAX_RECEIVE_LENGTH-1) {
      // if newline then command is complete
      if (inChar == '\n') {
      // a command was issued by the client
      // we will now try to send it to the actuator
      inputString[inputPos] = 0;
      // echo the string to the serial port
      Serial.print(inputString);
      gw.parseAndSend(inputString);
      // clear the string:
      inputPos = 0;
      } else {
      // add it to the inputString:
      inputString[inputPos] = inChar;
      inputPos++;
      }
      } else {
      // Incoming message too long. Throw away
      inputPos = 0;
      }
      }
      }
      gw.processRadioMessage();
      }

      here is the result

      Senza nome-4.jpg

      thank to Norbert Truchsess for skecth

      posted in Hardware
      gigi
      gigi
    • RE: Help Me!!! Hardware problem arduino uno gateway

      server.write(writeBuffer); in EthernetGateway.ino stops arduino!!!

      If I comment server.write(writeBuffer); in function writeEthernet(char *writeBuffer) arduino uno receive and transmit data via radio.

      Node Humidity
      req node id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
      sensor started, id 255
      req node id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
      req node id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
      req node id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
      req node id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
      req node id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=ok:
      req node id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      T: 22.00
      req node id
      send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      H: 39.00

      Gateway without server.write(writeBuffer);
      0;0;3;0;14;Gateway startup complete.
      gateway is at 192.168.0.166
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
      255;255;3;0;3;
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
      255;255;3;0;3;
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
      255;255;3;0;3;
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
      255;255;3;0;3;
      0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0:
      255;255;3;0;3;

      Thank
      Gigi

      posted in Hardware
      gigi
      gigi
    • RE: Help Me!!! Hardware problem arduino uno gateway

      Humidiy sensor with arduino nano clone and dt11

      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      sensor started, id 255
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,st=fail:
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      T: 20.00
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      H: 40.00
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      T: 21.00
      req node id
      send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
      T: 20.00

      posted in Hardware
      gigi
      gigi
    • RE: Help Me!!! Hardware problem arduino uno gateway

      Arduino Uno genuine!!!

      radio connect
      http://www.mysensors.org/build/ethernet_gateway

      arduino -- > radio
      GND -- > GND
      3.3V -- > VCC
      A2 -- > MISO
      A1 -- > MOSI
      A0 -- > SCK
      6 -- > CSN
      5 -- > CE

      Radio Led all off
      Arduino Uno Led:
      Led on : red
      ethernet shield: green led on

      serial monitor ide ardunino
      0;0;3;0;14;Gateway startup complete.
      but no ping to 192.168.0.66

      20141212_104631.jpg

      Thank

      posted in Hardware
      gigi
      gigi
    • Help Me!!! Hardware problem arduino uno gateway

      I would like to create a gateway ed a humidity sensor node

      I purchased two radio nRF24L01 and 2 arduino nano and 1 DHT-11

      Gatheway
      I connected all cable but I realized the arduino nano are Chinese and have a serial communication protocol different from the original arduino nano.

      I then abandoned the gateway with serial!!!

      I have another arduino uno whit ethernet shield!!!!
      ArduinoEthernetShieldV3.jpg

      loaded the sketck connected the cables but arduino crashes

      I followed the discussion forum

      ###########
      uncomment (remove //) #define SOFTSPI

      change pin numbers as below:
      const uint8_t SOFT_SPI_MISO_PIN = 15;
      const uint8_t SOFT_SPI_MOSI_PIN = 14;
      const uint8_t SOFT_SPI_SCK_PIN = 16;

      Connecto radio and gateway as per instructions for ethernet gateway except MISO, MOSI and SCK.
      These connect as below
      radio MOSI to arduino A0,
      radio MISO to arduino A1,
      radio SCK to arduino A2.

      comment UIPEthernet.h (//#include <UIPEthernet.h>)
      uncomment Ethernet.h (#include <Ethernet.h>)

      choose IP address
      ###########

      arduino uno don' respond at ping if i remove a radio module.

      Thank for all

      Gigi

      posted in Hardware
      gigi
      gigi