I2C device library

olo
2017-09-13
2021-09-27
  • olo - 2017-09-13

    Hello,
    I'd like to make a library to my I2C device and I have question how to add line in configuration window of device like in attachment ?

    IMG: config_window.png

     
  • eschwellinger

    eschwellinger - 2017-09-13

    Hi,
    this you need to add in the device descripton:
    "c:\Users\<yourwindowsname>\CODESYS Control for Raspberry PI\3.5.11.10\Devices\MCP23S17.devdesc.xml"
    "c:\Users\<yourwindowsname>\CODESYS Control for Raspberry PI\3.5.11.0\Libraries\SPI_MCP23S17.library"
    Then you need to extend the library to read the paramter.</yourwindowsname></yourwindowsname>

    After changing adding lines in the devicedescription the steps should be:
    Install the devicedescription to the device repoditory and then execute update device by rightclick in the device tree -> update device (then the edited and Change devdesc is used)

    BR
    Edwin

    IMG: ReadParameter.jpg

    IMG: AddParameter.jpg

     
  • FabioPD - 2020-02-26

    Hello! I need to add a I2C device AM2315 (https://learn.adafruit.com/am2315-encas ... duino-code)
    to my project, how to do this for my raspberry?
    I cant found it in the list ... may be I have to download a Adafruit package?

    Thanks.

     
    • tomas111 - 2021-09-27

      Hi, did you see bytes?

       
  • i-campbell

    i-campbell - 2020-02-26

    Hi Fabio, many are doing their own drivers in forge take a look at the documentation how to.
    https://forge.codesys.com/drv/io-drivers/doc/I2C/
    Can seem a little daunting but really it is achievable.
    Please let me know if you get stuck or want advice on a particular point. You can also ask in forge itself

     
    • tomas111 - 2021-09-27

      Hi, why not an example with I2C?

       

Log in to post a comment.