bonnyr / wokwi-ds1820-custom-chip

MIT License
3 stars 3 forks source link

Simulation of temperature changes does not work through setting attributes #21

Open avkondrat opened 1 year ago

avkondrat commented 1 year ago

tried various options for changing the attribute values in the diagram.json according to the description.

"attrs": { "genDebug": "0", "deviceID": "010203040506", "owDebug": "1", "temperature":"25.9375", "familyCode": "16", "minTemp": "10", "maxTemp": "20", "tempWaveForm": "triangle", "tempWaveFreq": "0.0156"}

the temperature is displayed constant in the console - Temperature is: 25.94 C

wherein output for the chip code: _chip-ds18b20 *** DS18B20 setting attributes: chip-ds18b20 gen_debug: 0 chip-ds18b20 ow_debug: 0 chip-ds18b20 temperature: 25.937500 chip-ds18b20 family_code: 10 chip-ds18b20 min_temp: -55.000000 chip-ds18b20 max_temp: 125.000000 chip-ds18b20 temp_freq: 0.000000 chip-ds18b20 temp_mode: 0 chip-ds18b20 deviceid: 10000000000000fb chip-ds18b20 DS18B20 chip initialised

what am I doing wrong? or is there an error in the source?

avkondrat commented 1 year ago

project here https://wokwi.com/projects/380852837058333697

bonnyr commented 1 year ago

will attend to it later today. Cheers, Bonny

On Thu, 9 Nov 2023 at 05:31, avkondrat @.***> wrote:

tried various options for changing the attribute values in the diagram.json according to the description.

"attrs": { "genDebug": "0", "deviceID": "010203040506", "owDebug": "1", "temperature":"25.9375", "familyCode": "16", "minTemp": "10", "maxTemp": "20", "tempWaveForm": "triangle", "tempWaveFreq": "0.0156"}

the temperature is displayed constant in the console - Temperature is: 25.94 C

wherein output for the chip code:

*chip-ds18b20 ** DS18B20 setting attributes: chip-ds18b20 gen_debug: 0 chip-ds18b20 ow_debug: 0 chip-ds18b20 temperature: 25.937500 chip-ds18b20 family_code: 10 chip-ds18b20 min_temp: -55.000000 chip-ds18b20 max_temp: 125.000000 chip-ds18b20 temp_freq: 0.000000 chip-ds18b20 temp_mode: 0 chip-ds18b20 device_id: 10000000000000fb chip-ds18b20 DS18B20 chip initialised

what am I doing wrong? or is there an error in the source?

— Reply to this email directly, view it on GitHub https://github.com/bonnyr/wokwi-ds1820-custom-chip/issues/21, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAUGTZ6GTQWTZ5TC3P74GHDYDPFYPAVCNFSM6AAAAAA7DKZB2KVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE4DIMJYGA4DMNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

avkondrat commented 1 year ago

Hi, Bonny...do you have any news?

bonnyr commented 1 year ago

The project indicates you're using an older release. I suggest updating to the most recent release (0.4.5) and test again. When I did, the temperature seems to be behaving as intended: https://wokwi.com/projects/381317255436327937

If this works for you, please let me know and I can close the issue