Skip to content

Latest commit

 

History

History
62 lines (44 loc) · 2.46 KB

nrf9151dk.md

File metadata and controls

62 lines (44 loc) · 2.46 KB

nRF9151DK device guide

Installation

NOTE: If you will be using cellular location or want to speed up GNSS location by using AGNSS, the development kit needs to be connected to nRF Cloud to get the data. Follow these steps before installing Micropython on it or while running a MicroPython program that tries to connect to nRF Cloud (like the Asset Tracker example). This only needs to be done once.

Usage

The interface chip on the nRF9151DK exposes 2 virtual COM ports. The first one is where you will find the MicroPython REPL prompt.

Filesystem

The first time that you use the device you might need to create the filesystem. You can do that from the REPL prompt:

import os
from zephyr import FlashArea

block_dev = FlashArea(FlashArea.STORAGE, 4096)
os.VfsLfs2.mkfs(block_dev)
os.mount(block_dev, '/flash')

Buttons and LEDs

There are four buttons:

  • Button 1: It can be used with Pin.cpu.gpio0_8
  • Button 2: If pressed at boot time, the board will skip executing a main.py file from the filesystem. During normal operation, it can be used with Pin.cpu.gpio0_9
  • Button 3: It can be used with Pin.cpu.gpio0_18
  • Button 4: It can be used with Pin.cpu.gpio0_19

There are four LEDs:

  • LED1: Can be accessed with Pin.cpu.gpio0_0
  • LED2: Can be accessed with Pin.cpu.gpio0_1
  • LED3: Can be accessed with Pin.cpu.gpio0_4
  • LED4: Can be accessed with Pin.cpu.gpio0_5

Pins and GPIO

from machine import Pin

pin = Pin(Pin.cpu.gpio0_2, Pin.OUT)

I2C

The available bus is i2c2 and this is how you get an instance:

from machine import I2C

i2c = I2C('i2c2')

Cellular Interface

See the Cellular Guide for the network APIs.