Advertisement

Quick Links

Application Note
BRT_AN_080
LDSBus Python SDK on IDM2040 User
Guide
Version 1.0
Issue Date: 29-11-2021
This document provides information about how to setup and use the LDSBus Python
SDK on IDM2040.
Use of Bridgetek devices in life support and/or safety applications is entirely at the user's risk, and
the user agrees to defend, indemnify and hold Bridgetek harmless from any and all damages,
claims, suits or expense resulting from such use.
Bridgetek Pte Ltd (BRTChip)
178 Paya Lebar Road, #07-03 Singapore 409030
Tel: +65 6547 4827 Fax: +65 6841 6071
Web Site:
http://brtchip.com
Copyright © Bridgetek Pte Ltd

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the LDSBus BRT AN 080 and is the answer not in the manual?

Questions and answers

Summary of Contents for Bridgetek LDSBus BRT AN 080

  • Page 1 This document provides information about how to setup and use the LDSBus Python SDK on IDM2040. Use of Bridgetek devices in life support and/or safety applications is entirely at the user’s risk, and the user agrees to defend, indemnify and hold Bridgetek harmless from any and all damages, claims, suits or expense resulting from such use.
  • Page 2: Table Of Contents

    Acronyms and Abbreviations ............. 19 Appendix B – List of Tables & Figures ......20 List of Tables ................20 List of Figures ................20 Appendix C – Revision History ........21 Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 3: Introduction

    The Python SDK will run on IDM2040 with appropriate LDSBus interface. IDM2040 has built-in LDSBus interface and is capable of supplying up to 24v to the LDSBus. More information on the IDM2040 is available at https://brtchip.com/product/. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 4: Credits

    Application Note BRT_AN_080 LDSBus Python SDK on IDM2040 User Guide Version 1.0 Document Reference No.: BRT_000378 Clearance No.: BRT#187 2 Credits Open Source Software  Thonny Python IDE: https://thonny.org Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 5: Getting Started With Idm2040

    Reset Button Port for PC Jumper 20v Adapter RJ45 connection Figure 1 - IDM2040 Hardware Features 3.2 Hardware Setup Instructions Follow these steps to setup the IDM2040 Hardware Setup – a. Remove the Jumper. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 6 Connect the LDSU module to HVT. Using RJ45 cable, connect HVT to IDM2040 RJ45 connector. d. Connect the 20v supply adapter using a USB-C cable to the USB-C port on the IDM2040. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 7 In the given example package, there must be an “.uf2” file, copy the file and paste it into “RP1-RP2” drive. Upon copying the “.uf2” file to “RPI-RP2”, the device will reboot automatically and again will appear as a new drive, such as “CIRCUITPY”. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 8 The COM port for this device will appear in Device Manager. Here is an example screen showing the IDM2040’s COM Port as COM6. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 9: Thonny Python Ide - Installation/Setup Instructions

    (.exe) and following the installation wizard. Upon completing the installation, open the Thonny Python IDE from the Windows Startup. d. To open the Properties, click the left mouse button at the right bottom corner. Select “CircuitPython (generic)”. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 10 Click “Configure Interpreter…”. Click on the Port drop down and select the port appeared for IDM2040 in device manager after connecting. In this example screenshot COM port appeared as COM6. Click [OK]. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 11 Document Reference No.: BRT_000378 Clearance No.: BRT#187 g. Thonny will report the device information at the interpreter prompt (“Adafruit CircuitPython 7.0.0-dirty on 2021-11-11; Raspberry Pi Pico with rp2040”) if the device port is correct. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 12: Procedure To Run Ldsu Circuitpy Sample Example Using Thonny

    Open the sample package file. As part of the sample package there is a folder by name “json” which contains various sensor json file. b. Copy and paste the “json” folder to the “CIRCUITPY” storage device. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 13 Editor and save it. For example, open “LDSBus_Thermocouple_Sensor.py” and copy/paste on Thonny Editor. Click [Save]. d. Upon clicking [Save], a “Where to save to?” dialog box will be displayed. Click and select CircuitPython device. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 14 Note: When sample code is saved to “code.py” then every time it reboots, it will begin running “code.py”. In order to avoid this, specify a different name. The file will be saved to “CIRCUITPY” drive. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 15 Clearance No.: BRT#187 g. To run the example from Thonny Editor, click (Run current script). h. The Circuitpy LDSU example will run to scan the bus and start reporting the sensor data. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 16 (Stop). Users can update the code as required or can copy/paste another example to try in the Thonny editor. Note: Upon making any changes to the script file, remember to Save and Run the script. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 17 BRT_AN_080 LDSBus Python SDK on IDM2040 User Guide Version 1.0 Document Reference No.: BRT_000378 Clearance No.: BRT#187 Remember copy following files “irBlasterAppHelperFunctions” “lir_input_file.txt” before trying the LDSBus_IR_Blaster.py example. Refer BRT_AN_078_LDSU Blaster_Application more details “LDSBus_IR_Blaster.py” example. Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 18: Contact Information

    Bridgetek. Use of Bridgetek devices in life support and/or safety applications is entirely at the user’s risk, and the user agrees to defend, indemnify and hold harmless Bridgetek from any and all damages, claims, suits or expense resulting from such use.
  • Page 19: Appendix A - References

    Clearance No.: BRT#187 Appendix A – References Document References BRT_API_002_LDSBus_Python_SDK_Guide BRT_AN_078_LDSU IR Blaster_Application Acronyms and Abbreviations Terms Description High Voltage T-Junction Integrated Development Environment LDSBus Long Distance Sensor Bus Universal Serial Bus Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 20: Appendix B - List Of Tables & Figures

    Version 1.0 Document Reference No.: BRT_000378 Clearance No.: BRT#187 Appendix B – List of Tables & Figures List of Tables List of Figures Figure 1 - IDM2040 Hardware Features ................. 5 Product Page Document Feedback Copyright © Bridgetek Pte Ltd...
  • Page 21: Appendix C - Revision History

    Appendix C – Revision History Document Title: BRT_AN_080 LDSBus Python SDK on IDM2040 User Guide Document Reference No.: BRT_000378 Clearance No.: BRT#187 Product Page: http://brtchip.com/product/ Document Feedback: Send Feedback Revision Changes Date Initial Release 29-11-2021 Product Page Document Feedback Copyright © Bridgetek Pte Ltd...

Table of Contents