thanks for sharing this added to CODESYS V3 Raspberry Pi share your devices & libraries & applications
l viewtopic.php?f=23&t=5872&p=18200#p19664 l
Here is my Library for some I2C devices for CODESYS.
You can place all devices behind a multiplexer to reduce address conflicts.
Although include the BME280 Environment sensor and an SD1306 Display Driver.
Look at google for these little funny Displays.
All fonts are working on the display, but not the biggest. There the bits have to be twisted.
If you find any problems, tell me, the Drives have not been tested all.
Don't look at the documentation, there is none ... .
In the I2C_Base FB I did write some info’s for the muxing.
With the muxing IC you can connect about 33554432 BME280 on the raspi, but then bus cycle time is no longer a problem .
You will need the OSCAT building lib to compile. i can not uplode it here like the OSCAT BASIC lib(to big), so try the lib from the store.
25C512 64KiB EEPROM
An 4channel dimmer (I done this for an friend)
PCA9555 as 16 bit input
PCA9555 as 16 bit output
PCA9685 a 16 channel 12bit PWM output, inspired by example code of CODESYS but writes only when output value is changing
PCF8575 as 16 bit input
PCF8575 as 16 bit output
SSD1306 Display Driver
TCA9548 8 channel I2C Multiplexer/switch
TSL2561 lux sensor, state I would say experimental
xml devices.zip [18.38 KiB]
Raspberry I2C MUX.projectarchive [388.84 KiB]
BASIC.projectarchive [398.68 KiB]
forgot the xml's
Originally created by: PhilouG
I'm using Codesys V3.5 SP15 patch3 with a raspberry pi.
I have installed the OSCAT basic and building package, the I2C MUX library and the BME280.xml.
I have a message error : the library « #CommonTypsFunctions » can't be opened.
Can you help me?
I have to use TCA9548 with 2 SHT21.. What aI have to do to configure it?
I tried to set 1 slave, changed ID from 0x77 to 0x70.
But How to read my slaves? thank you
Log in to post a comment.