SPI Devices

camo
2020-11-14
2020-11-15
  • camo - 2020-11-14

    Hi there. New to Codesys. I see there is SPI support for some devices (on Raspberry). I'd like to use a SX1278 to communicate to a remote Arduino or similar. Is this a viable option? What would I need to do to achieve something of the sort?

    [EDIT] - I was wrong. SX1278 is UART πŸ˜…
    Can I then use a USB to serial adapter with wireable terminals?

    Regards
    Cam

     

    Last edit: camo 2020-11-14
  • eschwellinger

    eschwellinger - 2020-11-14

    sure .. just edit
    /etc/CODESYSControl_Users.cfg

    [SysCom]
    Linux.Devicefile.1=/dev/ttyUSB0

    if your device is on ttyUSB0

    BR
    Edwin

     
  • camo - 2020-11-14

    Thanks Edwin

    I'll give this a try

     
  • camo - 2020-11-14

    Actually, is it possible to use the serial pins on the GPIO. Any special config needed for that as well? Thanks

     
  • i-campbell

    i-campbell - 2020-11-15
    1. Disable the raspbian serial console on the port.
    2. Find out the port with dmesg | grep -i tty

    [SysCom]
    Linux.Devicefile.1=/dev/ttyUSB0
    Linux.Devicefile.2=/dev/ttyS0

    Then you access the tty as com2 in codesys

     

Log in to post a comment.