@OldSurferDude
yeah, 10 virgin nodes powered up at the same time is a bad idea I seem to remember reading somwewhere here warning aginst that.
If yu have node ID trust issues with Mysensors you should move your address to different locaion as 0x00 is used by Mysensors... just sayin..;)
Posts made by Sasquatch
-
RE: Nb of possible nodes in a mysensors networks with domoticz
-
RE: Nb of possible nodes in a mysensors networks with domoticz
@OldSurferDude
Yeah I see the special use case here.
but.
A) MySensors stores node ID in epprom without any of your code
B) Sketch without#define MY_NODE_ID
will use eeprom stored ID, If eeprom is empty, addres 0x00=0xFF node will request ID to be assigned by gateway and save assigned ID at eeprom address 0x00
C) to retrieve eeprom stored ID you should use MySensors function :getNodeId();
To put it bluntly your code to read/write eeprom is redudndant as everything it does is natively handled by MySensors.
Don't get me wrong, your code looks tidier than most of my "efforts" but you're reinventing the wheel here, a bit..
Neat trick with skipping compile before upload by the way.To replace dead node all you have to do is upload simplest node sketch with definded desired node ID, let it boot to update eeprom, then load your node program using
getNodeId();
to retrieve node id if you need it in your code.
Or am I still missing something?
-
RE: Sending offset to node
easiest way would be to add thermostat "sensor2 to youd node and adjust that to desired temperature. But since your node is sleeping you will have to request the set value when it wakes up.
Here is an example of how my power meter was getting last KWH from controller after power cut, I removed irrevelant code for clarity:loop(){ if (!daySet) { request(dayID, V_KWH); wait(3333, C_SET, V_KWH); } if(!nightSet){ request(nightID, V_KWH); wait(3333, C_SET, V_KWH); } } void receive(const MyMessage &message) { if(message.getCommand() == C_SET){ if (message.type == V_KWH) { if(message.sensor == dayID){ dayCount = MeterRatio * message.getFloat(); dayCountOld = dayCount; dayCountWatt =dayCount; daySet = true; } else if (message.sensor == nightID){ nightCount = MeterRatio * message.getFloat(); nightCountOld = nightCount; nightCountWatt = nightCount; nightSet = true; } } } }
It was taking approx 2 seconds wits domoticz(2019 version) to reply to my requests.
You may run into errors with this method as your sleeping node won't send back ACK when you set new offset though.
Some controllers can disable requirement for ACK, i think.
More advanced way would be creating dummy thermostat to set new value(so you would have live and dummy thermostats) and using controller scripts to update the live thermostat on receipt of a temperature, you would have to wait after sending temperature or humidity. -
RE: Nb of possible nodes in a mysensors networks with domoticz
@OldSurferDude
no offence but rtfm#define MY_NODE_ID 3
is all you need to set predefined node id's, change 3 to any number from 1 to 254, it's worth having a spreadsheet with assigned ID's to avoid doubles, or at least write ID on the node itself.
If you ommit above define Mysensors store ID in eeprom after it gets autoassigned by gateway/controller on first start. -
RE: Nb of possible nodes in a mysensors networks with domoticz
@GLAB Uno-Nrf comms are ok, your node woulnd't get to sending radio packest if radio chip comms weren't ok.
Instead of reflashing working node and gateway try backdating MySensors library in arduino. You should see what version is used in working gateway somewhere in your contrloller, or by connecing yor serial gateway directly to your PC. in case of ethernet/wifi gateway you can alco use MySController from here:
https://www.dropbox.com/scl/fi/prn9p2cnheyteopokszor/MYSController.zip?rlkey=up54kg4lt2blmff66t2jlgeo6&e=1if your working node/gateway in on 2.00 and your new node works with that, then you can update them all with minimal risk of borking it all.
-
RE: Nb of possible nodes in a mysensors networks with domoticz
it seems your node never received any reply, are you setting you radio correctly? I'm not using nrf24l01s but you are probably using pa+lna version witn non pa+lna code...
-
RE: Saving last known good state, but not in EEPROM
@OldSurferDude jus request counter states from controller on each reset, worked fine with Domoticz...
or save in eeprom but increase location every write, on power up/reset search eeprom for largest value stored and carry on from that location, one long integer will fit 256 times in atmega328(p) eeprom, is that long enough for you?
-
RE: Radio waking up for no reason.
Over 4 years on, and my node ran continuously sending 4 messages every 5 minutes.
It's 700mAh LiFePo4 battery voltage dropped from initial 3.45V to 3.24V, according to LiFePo4 voltge/SoC tables It's just under 40% left.
700*60% = 420mAh. 100 mAH per year. using library 2.40 and blob message I could cut usage to ~25mAh/year, not bad -
RE: Best password manager?
@NeverDie Linux and antivirus... I say no since only one I can recommend is only available for windows and mac.
@mfalkvidd said in Best password manager?:
@NeverDie for travel, I would say the largest risk is a border search. US does it, so I would suspect Russia does as well. Good guide: https://www.eff.org/document/eff-border-search-pocket-guide
Say whaat? Border officials in US can confiscate my laptop willy nilly? I'm glad I have no plans to travel there, and if I do I'll encrypt the hell out of everything I carry, even my wrist watch will need password to show time
-
RE: Best password manager?
@NeverDie said in Best password manager?:
Here's a case study that examined how 1Password, Dashlane, KeePass and LastPass could leak data: https://www.ise.io/casestudies/password-manager-hacking.
As I said before no password manager is safe on machine crawling with viruses and/or malware
That's where antivirus software comes to play if you skip that there is no escape from being eventually "hacked".Main advantage of password manager is not reusing passwords for different services. When one gets compromised it's that. One password leaked, one account compromised, rest is safe. Alternative would be pen and paper notepad, reusing one password, or using memorable password combinations all bearing much greater risks than any decent password manager.
IMHO you are getting a bit paranoid, I do agree with BearWithBeard, use as few extensions as practical.
Firefox+adblockplus+kepassxc+cookiecleaner is my "daily driver"
For weird side of internet I use TOR browser.
For testing downloads use VM.
Plus good paid antivirus, so far so good. -
RE: Best password manager?
The keylogers I mentioned are either usb plug extensions(hard-ish to spot) or Bluetooth dongles that listen to wireless keyboards, some of them use very weak or no keyboard<->dongle authentication.
Intercepting passwords between browser and website/server is possible but requires:
a: MITM attack => access to local network easy peasy on cafΓ© WIFI
or
b: DNS poisoning => admin access to ISP infrastructure or local network router.On top of that stupid/not paying attention user who will ignore lack of SSL/https connection or add exception to accept website certificate signed by ROOT CA not trusted by os/browser.
Or physical access to victim's computer to add own ROOT CA to trusted CA's database, malware can do it too.
Only way to rule user error, malware or physical access out it to fake ROOT CA and sign certificate to dodgy server, but it's not possible without access to some serious brute forcing compute power - we are talking exascale supercomputer for couple of years here.
It is very personal attack, and unless you are VIP you can forget about it anyway.I'm not so sure about forgetting...No password manger is safe on a machine crawling with malware, Antivirus/antimalware are a must!!!
Although there is a plugin for original keepass that auto-types password out of order to fool potential malware keyloggers. It's called floating panel.AFAIK all browser password managers use windows user password to encrypt them, and changing password automatically changes encryption key too SIC!!
Considering that one can overwrite windows password or disable it temporarily for covert hack!! in 30 seconds with simple bootable usb stick(windows password unlocker) such form of encryption is more than useless in stolen laptop scenario. And Mac's have passwords reset feature baked into o/s so resetting it is even easier.From time to time there is malware/loophole in browser that leaks passwords, last one was opera on the news.
NEVER USE BROWSER SAVE PASSWORD FEATURE! -
RE: Best password manager?
+1 to keepass, store your database on Google drive/Dropbox/nextcloud and secure it with password+ yubikey and you have bulletproof solution. Just remember to have clone youbikey in a safe.
Keepassxc on windows/Linux, keepas2android and keepasium on Android and iPhone respectively.@mfalkvidd ever heard of hardware keyloggers? You can buy ones that log every keystroke on any wireless keyboard(wired too).
That's why I'm using yibikey and keepass. Even if my master pass leaks out it's useless without youbikey. And stolen/lost yubikey without pass is just a piece of plastic.
-
RE: How to properly handle variable requests
I see it this way:
NodeA sends C_REQ of Var1 to NodeB
NodeB processes C_REQ message in receive();
NodeB replies with C_SET of Var1 to NodeA just as controller would
NodeA processes C_SET message in receive();You can use echo/ACK functionality or not, it doesn't matter.
If you want both nodes to synchronise their variables, then it seems best to:
a)request values on boot
b)On variable change send values without promptThat way you cut traffic by half compared to request-reply approach.
-
RE: House renovation, how to a good electrical system oriented to MySensors?
@alowhum said in House renovation, how to a good electrical system oriented to MySensors?:
What do you mean with running it in a loop? Where could I learn more about that?
wires in the loop:
PSU-----GW----Node1----node2
|____________________________|Use switching regulators to keep current down.
-
RE: Solar Energy Harvesting for wireless motes
I made pcb for it it's on the roof of my flat, will dig trough my archives to see if i have kicad project for it.
-
RE: Solar Energy Harvesting for wireless motes
cough cough , so much dust here in the archives...
@NeverDie SPV1050 is what you are looking for, only Maximum Power Point Tracking IC from all IC's you mentioned/tested in both your topics. And trust me, it makes a whole world of a difference. ST even have online component calculator for matching it to solar panel and battery used. My usage scenario was outdoor rechargeable coin cell battery and calculator solar cell. Only drawback: you have to determine maximum power point of your solar cell.
-
RE: ESP8266 Gateway (RFM69) Soft WDT reset every 5 - 10 min
just a thought, since resets are happening under heavy trafffic:
What is your serial speed? 9600 could lead to buffer overflows under heavy traffic -
RE: The "new" Arduino Pro IDE
@BearWithBeard said in The "new" Arduino Pro IDE:
When I first heard about the Pro IDE, I was curious if they would manage to implement an open hardware debugger for AVRs, because as of yet, this is AFAIK still only possible with proprietary Atmel / Microchip hard- and software. But I doubt that this is going to happen.
AFAIK only IAR uses atmel(sadly Microchip now) hardware for debugging, no other IDE i tried can use dragon or ICE for more than just programming. Expecting Arduino to support hardware debuggers was insanely optimistic.
-
RE: The "new" Arduino Pro IDE
Still same crap as it was, throws you an error without even a line number to make finding it possible!!!
@TRS-80 arduino didn't lower board prices, aliexpress clone sellers did
-
RE: BATERY CHARGER CONNECTION ?
In Proteus you click on terminal end to draw a wire connection
But on serious note - with copper with help from soldering alloy on PCB
.
If you are asking for exact schematics then do your own homework and look in TP4056 datasheet. You are looking for typical application drawing.
Tp4056 is linear regulator, very inefficient, look at spv1040 or spv1050 instead - MPPT tracking propper solar chargers.
-
RE: PIR with no interrupt - doubts.
If it stopped working after adding mysensors then it must be at fault.
Do you see normal mysensors debug messages?
Does it connect to gateway?
Try adding :#define MY_TRANSPORT_WAIT_READY_MS 5000
before
#include <MySensors.h>
that will allow to execute your loop(); even without radio link working.
-
RE: Domoticz/Mysensors
put your code in code tags, makes it much easier to read, use bar above text field it's </> icon.
-
RE: Second setup, choosing a radio
@projectMarvin
nrf52 rx current is ~5mA - 480h on 2400mAh battery
rfm69 rx current is 16mA - 150h same batteryBoth times rather pathetic, you never run battery powered node in constant rx mode.
If you power down radio as often and for as long as possible you can get 5+ years out of both radios on single AA lithium thionyle battery and keep data flowing every minute or so. I suspect that on Nrf it might need less programming acrobacy.As for OTA, you should need to update your firmware only when security patches come out for library, once a year maybe?
pulled from nrf52840 datasheet:The non-volatile memory controller (NVMC) is used for writing and erasing of the internal flash memory and the UICR (user information configuration registers). (...) The CPU must be halted before initiating a NVMC operation from the debug system.
It looks to me that self programming is not possible. BUT i have never worked with tem (or any other M4) so what do i know
-
RE: Second setup, choosing a radio
I found that 2.4 GHz is too noisy for stable operation in area, had problems with range and missing packets. Radios worked fine, 80-90 meters in open field, 2 meters indoors across one room !!! but i can see 20+ WIFI networks within reach.
Long story short: check your environment before you buy many radio modules.I'm currently in finishing stages of ultimate low power node - 5+ years on single AA(LITHIUM) battery with one minute update/report interval, based on RFM69+atmega328p.
If you really need/wand OTA then nrf24 or rfm69/rfm95 is the way to go. Possibly gateway could be nRF52840 and nodes nrf24, not 100% sure, but should be compatible.
-
RE: Suggestions for my setup? Very new here.
Imagine thermostat relying on IFTTT/cloud to work on schedule and your internet fails(winter, someone crashes car into ISP cabinet)...
-
RE: Suggestions for my setup? Very new here.
@Smart-Projects-ABC
1- not really. HA can use any sensor with Google Assistant(not sure if alexa was added since I last used it)
2-flash requried? - going back to 2005 is IMHO not the way forward, what kind of advanced automation cannot be done in, say Domoticz or HomeAssistant?
3-as little different protocols as practicable is a good idea
4- I would add: avoid cloud based sensors at all cost for security and future proofing reasons. Cloud based sensor can be rendered useless by vendor deciding it's time to sell you a new one. Having local controller talking to sensors/actuators over WIFI/ZIGBEE/RFM69/NRF24/MagicBeam and allowing remote control over GA/Aexa/an app is more robust solution than every sensor talking to a server in china over different open port and ten talking trough outdated website(ittt.com) to talk to controller over yet another open port....And yes, with a bit of creativity and couple seeedstudio.com orders you can get every sensor you want on MySensors transport
-
RE: Help needed to setup a RFM69 & ESP8266 Gateaway on Adafruit Feather Huzzah
@scalz I do agree,
I found that even USB powered NodeMCU gateway needed at least 10uf ceramic or 47uF electrolytic capacitor on radio supply, without it heavy traffic was causing gateway freezes and reboots. There is 100nF capacotor on rfm69 and 220nf on RFM69H modules(at least my Aliexpress cheap clones have them) right next to the VCC pin, so i skip the external one. -
RE: Help needed to setup a RFM69 & ESP8266 Gateaway on Adafruit Feather Huzzah
@scalz great explanation of new driver functionality.
Some cheapest Aliexpress boards are not marked at all or marked with Frequency only. H versions have additional sot23-6 chip near antenna pin.Wonder why the new driver wasn't stable enough to do 12kB OTA firmware update even once, regardless of settings
. Same GW and node works flawlessly on old driver over 10-100 meters.
-
RE: V_ARMED vs V_TRIPPED questions.
Agree with @Yveaux.
V_ARMED can be used in battery powered door sensors to preserve battery, or to reduce traffic. don't send V_TRIPPED if V_ARMED is not set. Sounding alarm is controller's decision. -
RE: [SOLVED] Go to loop(); when parent/gateway can't be found.
@BearWithBeard my bad, looked at wrong post and understood your answer wrong, bloody small text on phones ;~)
-
RE: Domoticz/Mysensors
interesting schematic. another way of controlling lights is:
rewire standard light switch to low voltage input of arduino node
use node's relay to control light, works even if you don't have neutral wire in light switch backbox. -
RE: [SOLVED] Go to loop(); when parent/gateway can't be found.
@BearWithBeard
If you omit#define MY_TRANSPORT_WAIT_READY_MS 1000
or define it as 0 and transport is not ready on boot then sketch will never reach loop();
if (!isTransportReady()) { // No uplink }
Is handy for skipping sending data to gateway in fault condition, saves battery/power.
-
RE: Help needed to setup a RFM69 & ESP8266 Gateaway on Adafruit Feather Huzzah
@hlehoux no idea, i have mix of HW, W and H marked, all play together nicely.
-
RE: RFM gateway and sensors node with range issue
@wiredfrank roll back to old driver, use 17cm(433Mhz)/8.5cm(868 MHz) piece of straight wire as antenna.
Solder extra 100-470uf capacitor directly to supply pins of the radios too, especially HW versions. Transient current spikes can cause all sorts of problems.I'm using rfm69 mixed HW and non HW versions , and 500m meters is easily achieved, even on spider dupont wire connections and 2.4v supply(2x nimh aa cells).
also, don't rely on controller for connection tests, use debug serial output on both ends to confirm link.
-
RE: ESP8266 Gateway (RFM69) Soft WDT reset every 5 - 10 min
https://www.mysensors.org/uploads/57c1a2411730a6c715b6b1b0/image/RFM69.png
Solder it between GND and 3v3 pins.
sorry, can't find a picture on internet and can't take picture of mine atm. -
RE: Help needed to setup a RFM69 & ESP8266 Gateaway on Adafruit Feather Huzzah
try adding :
#define MY_RFM69_FREQUENCY RFM69_868MHZ
just in case....
My first prototype using dupont cables and piece of wire as antenna gave me 500m range with 3 or 4 houses between me and gateway.
Try old driver, no RSSI reporting, but my whole network runs on old driver.@hlehoux 1m range is usually caused by radio type misconfiguration, like running HW radio as low power or other way round. Another possibility is faulty radio.
-
RE: ESP8266 Gateway (RFM69) Soft WDT reset every 5 - 10 min
Try adding 220-470uf capacitor across radio supply pins, had similar problem with my gateway(NodeMCU) and RFM69HW during node OTA firmware updates.
You know you can map serial port to VM, right?
-
RE: Generic pressure sensors -SOLVED
It is most likely OP amp output you are seeing,
connect 5v, resistors as needed and multimeter to resistor output, check if works satisfactory, simple.... -
RE: RFM gateway and sensors node with range issue
Your node sketch is configured as HW model but you said you're using standard radio on it
comment out line below
#define MY_IS_RFM69HW
in sketch running radio without 6 legged chip next to ant pin
Been there done that, but I was getting 10 cm range on coil type aerials
-
RE: Issues when upgrading EnergyMeterPulseSensor from 1.5.x to 2.3.2
V_Var1 is variable(your total pulses) stored in the controller - HomeAssistant, Domoticz etc....
Assuming you have controller shut down you have to send that value from MYSController.This request will be fulfilled by controller after you configure it to use node's 7 child 1
-
RE: Mysensors Node not being recognized (added)
you add entry for your door sensor node to mysensors.json
AFAIK HA can't detect and automatically add your nodes -
RE: API questions regarding Home Assistant Core.
I haven't used HA for a while, but i used node ID's(numeric) and node child ID's(again, numeric) to identify sensors. Never added anything to node sketches, no need to, you add all your nodes, sensors and their names in config file anyway...
there are much better controllers IMHO, at least from ease of use point of view. -
RE: Radio waking up for no reason.
Update:
After few hours with AVR dragon snooping execution paths I found that after each loop() radio is woken up by code executed after each loop().
My solution is to never leave loop() by creating infinite loop inside of it, so far, after 10 h everything runs stable.
8-10 years on a single 1/2AA Lithium thionyl battery seems possible -
RE: [SOLVED] Go to loop(); when parent/gateway can't be found.
@mfalkvidd Thank You!!!
@skywatch just search forums, plenty of use examples, knowing what to search for was a key problem ;). -
RE: PlatformIO instead of official Arduino IDE?
@TRS-80
"Arduino IDE" is hardly an glorified notepad, it is beyond useless, why can't it save your board config with your project FFS!!!.
I'm using arduino plugin for atmel studio, since it's only way to use hardware debuggers, both AVR dragon and ATMEL ICE work great. -
[SOLVED] Go to loop(); when parent/gateway can't be found.
I have all light switches in my flat running a relay node with local switch.
Recent gateway PSU failure rendered all my lights nonoperational.
PSU tripped RCB and killed gateway, after power was resumed no light switch worked.
All nodes were stuck in endless loop trying to find gateway and never reached loop(), where local switch interactions are programmed.
Is there a way to prevent this? I had no working lights for 3 days before new gateway parts arrived!!! -
Radio waking up for no reason.
Hi.
I'm working on low power pulse power meter based on atmega328p@3.3v/8MHz.
My plan is:
a: Send KWh for day/night meter every 100 pulses
b: power radio ON only on 100th pulse
For (b) reason I'm not using sleep(); as sleep(); is powering up radio every time cpu is woken up.
sleep(0); => 20mA x 8ms
PowerDown(); => 4mA x 0.5ms
Using sleep(0); my node battery would last approx 80 times shorter than without it.
d: Calculate average power consumption every 30 minutes.
e: For reason (d) I'm running on internal oscillator with 32.768kHz crystal feeding Timer2 in asynchronous mode.Now the problem.
Before I enabled TIMER2 overflow interrupt everything worked fine. Pin change interrupts work as intended, radio stays down until data is ready to be sent.
As soon as I enable TIMER2 interrupt, wake up from it (every 8 seconds) and radio gets turned on by receiveDone(); called from f****k knows where.
I know it's receiveDone(); because I'm using AVRStudio and DebugWire debugging.
i could call transportDisable();(that's what sleep uses to switch radio off) but it takes 4 ms to cycle radio power, 8-10 times more power used that needed. -
RE: Arduino pro mini, rfm69 with 2 Reed switches on interrupts?
Just a thought.
I would personally go for one child ID/sensor.
"There is uncollected mail" indicator.
Set it to true when small door is tripped, and set to false when big door in open. -
RE: Arduino pro mini, rfm69 with 2 Reed switches on interrupts?
Found on here:
Quote:Commented by Manoraj Gnanadhas (Atmel)
2015-01-20 06:23:36 GMT
[Recipients: Nick Gammon]Hello Nick,
Our design team has confirmed that βNote-3 mentioned under Table 10-1β is a datasheet bug. So you can use any type of interrupt (Rising edge/ Falling edge / Low level / Any logical change) to wake up from sleep mode. Sorry for the inconvenience caused.
Best Regards,
Manoraj GnanadhasNot responding to reed relay:
PRIMARY_BUTTON_PIN interrupt is active only in sleep. if you're (un)lucky enough to move magnet when cpu is awake it will ignore it.More likely is that relay bounce longer than wake up time + 5ms in your loop.
Do away with pin reading, serial print and delay, shorter your loop, longer battery life.
In ISR (PCINT0_vect) set flag, then in a loop check for that flag.
If it's set it's secondary buttton pin that avoke your cpu,
if it's not set it's primary button .I'm reusing your variables:
#include <avr/sleep.h> #define DEBUG // coment out when ready to go into the box #ifndef DEBUG //disable serial in production compile, potentially saves few uA in sleep mode #define MY_DISABLED_SERIAL #endif ISR (PCINT0_vect) // handle pin change interrupt for D8 to D13 here { //delayMicroseconds(2); valueSecondary = true; // ISRs need to finish very fast or the arduino crashes. void loop() { // Sleep until something happens with the sensor //sleep(PRIMARY_BUTTON_PIN-2, CHANGE, SECONDARY_BUTTON_PIN-2, CHANGE, 0); sleep_bod_disable();//disable BOD - saves~ 15uA sleep(PRIMARY_BUTTON_PIN-2, CHANGE, 0); #ifdef DEBUG //get rid of unnecessary slow downs when ready Serial.println("Woken up"); #endif if (valueSecondary == true){ valueSecondary = false; #ifdef DEBUG //get rid of unnecessary slow downs when ready Serial.print("Secondary:"); #endif send(msg2.set(1)); //box emptied/mail in the box } else{ #ifdef DEBUG //get rid of unnecessary slow downs when ready Serial.print("Primary:"); #endif send(msg.set(1));//mail in the box/box emptied } }
Unless you really need to know if box was opened then closed, then check pin states in my if/else after 10-50ms delay, experiment until you get no bounce errors. BUT it will increase battery drain SIGNIFICANTLY.
You will have 2 messages sent per event, one per door opening and one per door closing. -
RE: Which battery measurement to use?
power consumption wise resistor-less method and running directly from LiFePo4(rechargeable 2.8-3.6V) or LiSoCl(3.6v non rechargeable) battery is best. Unless you remove regulator and USB/rs232 chip it's all wasting your time.
@mfalkvidd said in Which battery measurement to use?:
But if you get a "good" booster, the battery life will be more limited by the self-discharge of the battery than by the power usage of the node. Same goes for the non-boosted variant.
Depending on battery chemistry, LiSoCl will last 15 years. with carefully designed MyS node you can get 10 years on single AA LiSoCL battery. Something like power meter pulse counter transmitting once every kWh.
-
RE: Multiple relay arduino nano
@hakha4 said in Multiple relay arduino nano:
Hi
Or use a Mcp23017, 16 extra pins and only sda/scl pins from Arduino (I have a functioning sketch for this including reading multiple ds1820 sensors that can be used as a template. Let me know of you want this)
Regards HΓ₯kan
ds18x20 need 1 pin for up to 255 sensors(can't remember exactly but more than practical).@robert said in Multiple relay arduino nano:
Hi.
I would like to connect an 8 channel relays to arduino nano. I use rs485 communication. Rs485 uses pins 2,8,9. How to make 2,3,4 used? I miss pins.
Thx.Without knowing what else you're using it's impossible to know how to help you. but you may use A0-A7 as digital outputs too.
-
RE: NodeManager sensors with multiple interrupt pins
@j54n1n said in NodeManager sensors with multiple interrupt pins:
So can somebody confirm that pin change interrupts can wake up a sleeping node loaded with a NodeManager template sketch?
I have got the impression by reading here in the forum that the ATmega328p microcontroller has problems waking up from pin change interrupts. Maybe I am wrong?
You are wrong, i have one sitting on my bench right now sleeping and waking up on A5 pin change.
it's bare 328p test bead drawing mere 1uA in sleep...
Use sleep(0);
All the code you need to set things up:(tested on nano and mini boards)void pciSetup(byte pin)// enables pin change for given pin { *digitalPinToPCMSK(pin) |= bit (digitalPinToPCMSKbit(pin)); // enable pin PCIFR |= bit (digitalPinToPCICRbit(pin)); // clear any outstanding interrupt PCICR |= bit (digitalPinToPCICRbit(pin)); // enable interrupt for the group } void pciClear(byte pin)// disables pin change for given pin { *digitalPinToPCMSK(pin) &= ~(bit (digitalPinToPCMSKbit(pin))); // disable pin PCIFR |= bit (digitalPinToPCICRbit(pin)); // clear any outstanding interrupt PCICR &= ~(bit (digitalPinToPCICRbit(pin))); // disable interrupt for the group } ISR (PCINT0_vect)//pins d8-d13 { } ISR (PCINT1_vect)// pins a0-a7 { } ISR (PCINT2_vect)//pins d0-d7 { }
If you want to get several readings and then send them to gateway(power meter pulse counting) it's better to write your own sleep function. Built in sleep(); wakes radio on every wake up.
:work in progress:void PowerDown(void) { ADCSRA &= ~(1<<ADEN);//disable ADC - 120uA sleep_bod_disable();//disable bod - 15uA set_sleep_mode(SLEEP_MODE_PWR_DOWN); wdt_disable(); sleep_enable(); sleep_cpu(); sleep_disable(); ADCSRA |= (1<<ADEN);//enable ADC }
then call transportDisable(); before powering down
and transportReInitialise(); before sending your data. -
RE: π¬ MYSController
latest version I can find is 1.0.0 beta... but i've seen screenshots of 1.2.2. where can i get it from?