Comments (9)
Ups! I realise that I am using an I2C to OW interface on the Pi but a DS9490 USB plug on the Synology.
Using the DS9490 on the Pi gives the same problem - Invalid argument!
I tried with several DS9490 but with the same result.
So - problem changed but still there!
from onewirehub.
have you worked through the help section of the readme.md in the root-folder?
propably the problem is connected to issue #43, #35, #23.
or maybe just #25
from onewirehub.
Thanks for a great library!
Any progress here? I am using attiny85 and experience the same for each command sent to DS2413. DS2405 is working fine, but I need readback possibility. DS2408 is also working fine with OWFS but is not working well with Domoticz, leaving me with DS2413 as the last option for controlling outputs. So, is there something that I need to try to change, given the fact that with 05 and 08 the timing seems ok?
(Master is a ds2482-800 on RPI)
from onewirehub.
@pklarsjo so did you work through my previous tipps? it seems to be that timing-issue. easy to fix by changing one value
from onewirehub.
from onewirehub.
of course you should! ds2405/2413 does almost nothing on the bus, very short messages. when more memory is involved the ow-messages get longer. timing problems are more likely to occur.
from onewirehub.
from onewirehub.
ONEWIRE_TIME_MSG_HIGH_TIMEOUT changed to x10, no difference. Some additional info:
Exact command: echo '1' > PIO.A
Reading from device is no problem: cat sensed.A
My code:
/*
- Example-Code that emulates a DS2413 Dual channel addressable switch
- Tested with
-
- DS9490R-Master, atmega328@16MHz and teensy3.2@96MHz as Slave
*/
- DS9490R-Master, atmega328@16MHz and teensy3.2@96MHz as Slave
#include "OneWireHub.h"
#include "DS2413.h" // Dual channel addressable switch
constexpr uint8_t pin_led { 1 };
constexpr uint8_t pin_onewire { 0 };
auto hub = OneWireHub(pin_onewire);
auto ds2413 = DS2413( DS2413::family_code, 0x00, 0x00, 0x13, 0x24, 0xDA, 0x00 ); // Work - Dual channel addressable switch
bool blinking(void);
void setup()
{
pinMode(pin_led, OUTPUT);
// Setup OneWire
hub.attach(ds2413);
}
void loop()
{
// following function must be called periodically
hub.poll();
// Blink triggers the state-change
if (blinking())
{
digitalWrite(pin_led, ds2413.getPinState(0));
}
}
bool blinking(void)
{
const uint32_t interval = 1000; // interval at which to blink (milliseconds)
static uint32_t nextMillis = millis(); // will store next time LED will updated
if (millis() > nextMillis)
{
nextMillis += interval; // save the next time you blinked the LED
static uint8_t ledState = LOW; // ledState used to set the LED
if (ledState == LOW) ledState = HIGH;
else ledState = LOW;
return 1;
}
return 0;
}
from onewirehub.
This is getting even more strange. I enabled toggling of the state in the blinking function (ds2413.setPinState(0,ledState);) to see if device is live or not. After some normal 1sec flashes it suddenly freezes on or off. I know for sure it's not rebooting since I have added some fast boot blinks, it just stays for a while longer than expected.
In addition I've tried changing some parameters withou getting any progress (ONEWIRE_TIME_MSG_HIGH_TIMEOUT * 10, ONEWIRE_TIME_SLOT_MAX (120/135/150), VALUE_IPL (12, 13, 14) without any improvements.
Starting to despair... Is someone else using this device; has it been verified?
from onewirehub.
Related Issues (20)
- error:first bit of byte timeout HOT 1
- Issue on ESP32. Missing bit because interrupts executed
- Why DS2506_EEPROM.ino can't emulate more than 574 bytes of data? HOT 1
- Build issues on PlatformIO (for Arduino Uno)
- Stability / timing issue HOT 1
- Non-Volatile Memory / Save Page Data to EPROM
- Would it be possible to adapt this project with ATtiny85 for 1-wire + I2C? HOT 1
- ESPHome , Home Assistant HOT 1
- Need solution for ESPHome HOT 1
- Support for Raspberry RP2040 HOT 4
- Supported and tested Hardware: Attiny84 - Global variables use 574 bytes (112%) of dynamic memory HOT 17
- samd51 m4
- Instability when connected with several real slaves HOT 2
- Support for ATtiny816 / 1-series ATtiny HOT 2
- Not Run Correctly on STACK-M5 ATOM-U (ESP32) HOT 4
- DS2431 wrong answer (0x55) at Copy Scratchpad Command HOT 1
- DS2430 is not included in keywords.txt.
- DS2502 write command CRC seems incorrect
- Failed communication with master device - works with BUS PIRATE HOT 2
- DS2502_DELLCHG example sends all data as FFs only HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from onewirehub.