Arduino Library

Overview

This Arduino library provides a set of functions to control the CocoLinx nRF9151-Shield via UART when the shield is mounted on an Arduino board. It allows the Arduino host to communicate with the shield using simple API calls, without directly handling serial commands.

The library is designed to simplify shield control and enable quick integration into Arduino projects.

Features

  • Control LTE-M and RS485 Shield via UART

  • Network attach / detach control

  • UDP / TCP / MQTT / RS485 data transmission

  • GNSS positioning support

  • Modem direct AT commands

Installation

  1. Download ZIP file.

  2. Open Arduino IDE and go to Sketch -> Include Library -> Add .ZIP Library.

  3. Add .ZIP file.

  4. Click Sketch -> Include Library -> CocoLinx nRF9151_Shield Library.

Examples

  • Tester: An all-in-one integration example that exercises most library features, including UDP, TCP, MQTT, and RS-485, for quick sanity and setup verification.

  • Button_Example: Read Shield's button click counts every 5 seconds and print.

  • GNSS_Example: Read GNSS data

  • LED_Example: Turn on LED 5 seconds and turn off LED 5 seconds.

  • UDP_Example: Connect to LTE, open a UDP socket, and sends/receives data with an echo server.