hi Hek
how do you measur the noisyness?? with a fluck in AC ?? what are the limits .?
hi Hek
how do you measur the noisyness?? with a fluck in AC ?? what are the limits .?
2 metres away stillthe same result
i also tried to load an other sketch asthe one i was using was tuned by me....
still the same
i finaly tried using an other arduinoboard (original one) and it is working good......
the one who was not working correctly was this one ;
https://www.amazon.fr/gp/product/B00OPO44UE/ref=ox_sc_act_title_32?ie=UTF8&psc=1&smid=A21548PJTFXT87
di i have to put it to trash or is there a way to test it or to make it working ???
i double (triple) checked connections all ok
i checkes power suplies ; all ok
i have condansators installed on each nrf24
and i am testing it on my desk so no long distance to travel...
......
i tried to assigne a node id ;
Starting sensor (RNNNA-, 2.0.0)
TSM:INIT
TSM:RADIO:OK
TSP:ASSIGNID:OK (ID=44)
TSM:FPAR
TSP:MSG:SEND 44-44-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 44-44-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 44-44-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 44-44-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
!TSM:FPAR:FAIL
!TSM:FAILURE
TSM:PDT
TSM:INIT
TSM:RADIO:OK
TSP:ASSIGNID:OK (ID=44)
TSM:FPAR
TSP:MSG:SEND 44-44-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 44-44-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 44-44-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 44-44-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
!TSM:FPAR:FAIL
!TSM:FAILURE
TSM:PDT
TSM:INIT
gateway ;
0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSM:RADIO:OK
0;255;3;0;9;TSM:GW MODE
0;255;3;0;9;TSM:READY
IP: 192.168.1.19
0;255;3;0;9;No registration required
0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
0;255;3;0;9;TSP:MSG:READ 1-1-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:FPAR REQ (sender=1)
0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
0;255;3;0;9;TSP:MSG:GWL OK
0;255;3;0;9;!TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=fail:0
0;255;3;0;9;TSP:MSG:READ 44-44-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:FPAR REQ (sender=44)
0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
0;255;3;0;9;TSP:MSG:GWL OK
0;255;3;0;9;!TSP:MSG:SEND 0-0-44-44 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=fail:0
0;255;3;0;9;TSP:MSG:READ 61-61-0 s=1,c=1,t=0,pt=7,l=5,sg=0:20.9
0;255;3;0;9;TSP:MSG:READ 61-61-0 s=0,c=1,t=1,pt=7,l=5,sg=0:33.3
0;255;3;0;9;TSP:MSG:READ 44-44-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:FPAR REQ (sender=44)
0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
0;255;3;0;9;TSP:MSG:GWL OK
befor was the serial monitor of the gateway and below is the sketch i an using in the mega :
// Enable debug prints to serial monitor
#define MY_DEBUG
// Enable and select radio type attached
#define MY_RADIO_NRF24
#define SN "RelayButtonArray"
#define SV "1.0"
// Pin Confuguration for Arduino Mega
#define MY_RF24_CE_PIN 40
#define MY_RF24_CS_PIN 53
#include <MySensors.h>
#include <SPI.h>
#include <Bounce2.h>
#define RELAY_ON 0 // switch around for ACTIVE LOW / ACTIVE HIGH relay
#define RELAY_OFF 1
//
#define noRelays 8 //2-4
const int relayPin[] = {2, 4, 6, 8, 10, 12, 14, 16}; // switch around pins to your desire
const int buttonPin[] = {3, 5, 7, 9, 11, 13, 15, 17}; // switch around pins to your desire
class Relay // relay class, store all relevant data (equivalent to struct)
{
public:
int buttonPin; // physical pin number of button
int relayPin; // physical pin number of relay
boolean relayState; // relay status (also stored in EEPROM)
};
Relay Relays[noRelays];
Bounce debouncer[noRelays];
MyMessage msg[noRelays];
/*
void before() {
for (int sensor=1, pin=RELAY_1; sensor<=NUMBER_OF_RELAYS;sensor++, pin++) {
// Then set relay pins in output mode
pinMode(pin, OUTPUT);
// Set relay to last known state (using eeprom storage)
digitalWrite(pin, loadState(sensor)?RELAY_ON:RELAY_OFF);
}
}*/
void setup() {
wait(100);
// Initialize Relays with corresponding buttons
for (int i = 0; i < noRelays; i++) {
Relays[i].buttonPin = buttonPin[i]; // assign physical pins
Relays[i].relayPin = relayPin[i];
msg[i].sensor = i; // initialize messages
msg[i].type = V_LIGHT;
pinMode(Relays[i].buttonPin, INPUT_PULLUP);
wait(100);
pinMode(Relays[i].relayPin, OUTPUT);
Relays[i].relayState = loadState(i); // retrieve last values from EEPROM
digitalWrite(Relays[i].relayPin, Relays[i].relayState ? RELAY_ON : RELAY_OFF); // and set relays accordingly
send(msg[i].set(Relays[i].relayState ? true : false)); // make controller aware of last status
wait(50);
debouncer[i] = Bounce(); // initialize debouncer
debouncer[i].attach(buttonPin[i]);
debouncer[i].interval(30);
wait(50);
}
}
void presentation()
{
// Send the sketch version information to the gateway and Controller
sendSketchInfo(SN, SV);
wait(100);
for (int i = 0; i < noRelays; i++)
present(i, S_LIGHT); // present sensor to gateway
wait(100);
}
void loop()
{
for (byte i = 0; i < noRelays; i++) {
if (debouncer[i].update()) {
int value = debouncer[i].read();
if ( value == LOW) {
Relays[i].relayState = !Relays[i].relayState;
digitalWrite(Relays[i].relayPin, Relays[i].relayState ? RELAY_ON : RELAY_OFF);
send(msg[i].set(Relays[i].relayState ? true : false));
// save sensor state in EEPROM (location == sensor number)
saveState( i, Relays[i].relayState );
}
}
}
//wait(20);
}
void receive(const MyMessage &message) {
if (message.type == V_LIGHT) {
if (message.sensor < noRelays) { // check if message is valid for relays..... previous line [[[ if (message.sensor <=noRelays){ ]]]
Relays[message.sensor].relayState = message.getBool();
digitalWrite(Relays[message.sensor].relayPin, Relays[message.sensor].relayState ? RELAY_ON : RELAY_OFF); // and set relays accordingly
saveState( message.sensor, Relays[message.sensor].relayState ); // save sensor state in EEPROM (location == sensor number)
}
}
wait(20);
}
0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0)
0;255;3;0;9;TSM:INIT
0;255;3;0;9;TSM:RADIO:OK
0;255;3;0;9;TSM:GW MODE
0;255;3;0;9;TSM:READY
IP: 192.168.1.19
0;255;3;0;9;No registration required
0;255;3;0;9;Init complete, id=0, parent=0, distance=0, registration=1
0;255;3;0;9;TSP:MSG:READ 1-1-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:FPAR REQ (sender=1)
0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
0;255;3;0;9;TSP:MSG:GWL OK
0;255;3;0;9;!TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=fail:0
0;255;3;0;9;TSP:MSG:READ 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:FPAR REQ (sender=255)
0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
0;255;3;0;9;TSP:MSG:GWL OK
0;255;3;0;9;TSP:MSG:SEND 0-0-255-255 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=bc:0
0;255;3;0;9;TSP:MSG:READ 14-14-255 s=255,c=3,t=8,pt=1,l=1,sg=0:1
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:READ 0-14-255 s=255,c=3,t=8,pt=1,l=1,sg=0:0
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:READ 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:FPAR REQ (sender=255)
0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
0;255;3;0;9;TSP:MSG:GWL OK
0;255;3;0;9;TSP:MSG:SEND 0-0-255-255 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=bc:0
0;255;3;0;9;TSP:MSG:READ 14-14-255 s=255,c=3,t=8,pt=1,l=1,sg=0:1
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:READ 0-14-255 s=255,c=3,t=8,pt=1,l=1,sg=0:0
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:READ 1-1-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:FPAR REQ (sender=1)
0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
0;255;3;0;9;TSP:MSG:GWL OK
0;255;3;0;9;!TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=fail:0
0;255;3;0;9;TSP:MSG:READ 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:FPAR REQ (sender=255)
0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
0;255;3;0;9;TSP:MSG:GWL OK
0;255;3;0;9;TSP:MSG:SEND 0-0-255-255 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=bc:0
0;255;3;0;9;TSP:MSG:READ 14-14-255 s=255,c=3,t=8,pt=1,l=1,sg=0:1
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:READ 0-14-255 s=255,c=3,t=8,pt=1,l=1,sg=0:0
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:READ 1-1-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
0;255;3;0;9;TSP:MSG:FPAR REQ (sender=1)
0;255;3;0;9;TSP:CHKUPL:OK (FLDCTRL)
0;255;3;0;9;TSP:MSG:GWL OK
0;255;3;0;9;!TSP:MSG:SEND 0-0-1-1 s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=fail:0
0;255;3;0;9;TSP:MSG:READ 255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0:
0;255;3;0;9;TSP:MSG:BC
i used Mfalkvidd advices ......
its working better but stil not recognised from the gateway
Starting sensor (RNNNA-, 2.0.0)
TSM:INIT
TSM:RADIO:OK
TSM:FPAR
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
TSM:FPAR
TSP:MSG:SEND 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=bc:
!TSM:FPAR:FAIL
!TSM:FAILURE
TSM:PDT
i have a problem to make a radio NRF24L01 working on a MEGA 2560 to create a sensor node
i am using the standard mysensor connection (its working for me on a nano)
but when i use the same connection on the mega it is not working at all
i select the good board type before uploading .....
serial is giving me this message :
Starting repeater (RNNRA-, 2.0.0)
TSM:INIT
!TSM:RADIO:FAIL
!TSM:FAILURE
TSM:PDT
the radio moduleis working correctly on an other node.....
is there anithing i dont know to use a MEGA....
is the connection the same than on a nano
PS sorry for my bad english
this kind of optic fiber is probably only plastic so for a full DIY , you can use also fishing wire with a big power led or an old chistmass tree optic fiber lighted.....