Crevavi Confidential Page 2 of 25
Document Template V1.1
Contents
1. Introduction .............................................................................................................................................................. 3
2. Product Overview...................................................................................................................................................... 3
3. Technical Specification .............................................................................................................................................. 4
4. Operation .................................................................................................................................................................. 5
4.1. Connecting Digital inputs .................................................................................................................................. 5
4.2. Connecting Analog inputs ................................................................................................................................. 5
4.3. Connecting Digital Outputs ............................................................................................................................... 5
4.4. Install SAM-BA ................................................................................................................................................... 6
4.5. Program using SAM-BA ..................................................................................................................................... 7
1. Application References ............................................................................................................................................. 8
1.1. Programming Environment ............................................................................................................................... 8
1.2. API References .................................................................................................................................................. 9
1.2.1. Check / Set / Clear Konnect Status Flag .............................................................................................. 11
1.2.2. Wi-Fi Connection Operations .............................................................................................................. 11
1.2.3. TCP Operations.................................................................................................................................... 12
1.2.4. GPIO Operations ................................................................................................................................. 13
1.2.4.1. Configure/Enable input ports ......................................................................................................... 13
1.2.4.2. Configure/EnablRead all input port’s current status ...................................................................... 15
1.2.4.3. Read all input port statistics (Average, Frequency) ........................................................................ 15
1.2.4.4. Write output port ............................................................................................................................ 16
1.2.5. UART Operations ................................................................................................................................. 16
1.2.5.1. Configure COM Port ........................................................................................................................ 16
1.2.5.2. Read Data from COM port .............................................................................................................. 17
1.2.5.3. Write data to COM Port .................................................................................................................. 18
1.2.6. Schedule a function callback ............................................................................................................... 18
1.2.7. String operations ................................................................................................................................. 19
1.2.8. MQTT Operations ................................................................................................................................ 20
1.2.9. Modbus Operations ............................................................................................................................ 21
1.2.10. JSON Write .......................................................................................................................................... 22
1.1. Important Variable Configurations ................................................................................................................. 24