DCC-EX / Support-Planning

DCC++EX Repo to hold project planning documentation and processes
1 stars 1 forks source link

using PCF8574 as i/p #784

Open fire-bot opened 3 weeks ago

fire-bot commented 3 weeks ago

Sent by Derek Jones (@mmrsderek). Created by fire.


I am extremely confused regarding how to use the above device with DCC++EX.

I am using the latest s/w and MEGA clone with WIFI.

I wish to have a PCF8574 on i2c 20,21and 22.

The Web Throttle reports that I2C 20,21 and 22 are recognising the device.

I am confused as to where to put the create statements.

Also if I try to edit the myHAL.cpp file it reports that I have altered the file and will not use the updated file.

Sorry to raise this but I have not found anything on "Discord" and I am new to using expanders

Derek Jones

Ash-4 commented 3 weeks ago

Uncertain where you are having the issue. Use a recent devel version and you can add the lines in myAutomation.h You will not need to use myHal.cpp

// myAutomation.h
HAL_IGNORE_DEFAULTS
HAL(PCF8574, 200, 8, 0x20)    //    For The first PCF8574
HAL(PCF8574, 208, 8, 0x21) 
HAL(PCF8574, 216, 8, 0x22) 

The # accessories topic would be good to use for this question on the discord server, and generally a prompt answer. https://dcc-ex.com/support/index.html#preferred-option-discord

mmrsderek commented 3 weeks ago

Thanks for quick reply. I have tried it and is ok. Nowhere in docs have I seen that "HAL" command/directive. Although I welcome the huge volumes of Documentation produced I feel there are conflicts within the doc's. I have had prob's in past around sensors where they say to store in EPROM and then to place in myAutomation. I guess this is around the evolution of DCC++EX. Many thanks Derek

On Tue, 22 Oct 2024 at 15:29, Ash-4 @.***> wrote:

Uncertain where you are having the issue. Use a recent devel version and you can add the lines in myAutomation.h You will not need to use myHal.cpp

// myAutomation.h HAL_IGNORE_DEFAULTS HAL(PCF8574, 200, 8, 0x20) // For The first PCF8574 HAL(PCF8574, 208, 8, 0x21) HAL(PCF8574, 216, 8, 0x22)

The # accessories topic would be good to use for this question on the discord server, and generally a prompt answer. https://dcc-ex.com/support/index.html#preferred-option-discord

— Reply to this email directly, view it on GitHub https://github.com/DCC-EX/Support-Planning/issues/784#issuecomment-2429448633, or unsubscribe https://github.com/notifications/unsubscribe-auth/APCM5JTGXUIM6LPZC5TVN7TZ4ZOMHAVCNFSM6AAAAABQMCLVN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRZGQ2DQNRTGM . You are receiving this because you were mentioned.Message ID: @.***>

pmantoine commented 3 weeks ago

We would thoroughly welcome your contribution of any edits and improvements to the documentation.