SD Card

![]() | ![]() |
SD Card Storage Module
- Overview
- Drivers
- Samples
- Projects
SD Card Storage Module
Key features • On-board SD Card Slot | Resources |
Function | Description |
---|---|
DVer() | This driver version. |
The Code
Modules ship with this script preloaded. Use Console to reload or modify the drivers. Additionally, some languages, such as Python, include DUELink.Engine.Record()
for recording scripts directly from the host.
tip
uSD/SD card use FileSystem API directly. No other drivers needed.
##### Driver Code Starts Here ###
fn DVer()
return 0.1
fend
##### User Code Starts Here #####
- Script
- Python
- JavaScript
Use Console to modify the default driver by adding this sample.
# Append this code at the bottom of the script, right after the driver.
# You MUST keep the driver code!!
# file open types
_r = 0x01 # Read only
_w = 0x02 # Write only
_x = 0x00 # Open existing. Require existing file, or return -1
_n = 0x04 # Create new. Require NOT existing file, or return -1
_c = 0x08 # Create always. Force create new. If file is already exit, it will be deleted for new file.
_a = 0x30 # Open append. If not exist, create one.
Dim b1[] = "Hello World"
# SD card, pin 17 chip select, 8Mhz clock, 4 file handles max
fsmnt(1, 17, 8000, 4)
# Write b1 array to a file
h = FsOpen("/test.txt", _w|_c)
FsWrite(h, b1)
FSClose(h)
# Read from the same file to b2 array
h = FsOpen("/test.txt", _r)
Dim b2[11]
FsRead(h, b2)
Println(b2)
FSClose(h)
fsunmnt()
from DUELink.DUELinkController import DUELinkController
import time
availablePort = DUELinkController.GetConnectionPort()
duelink = DUELinkController(availablePort)
//code
Coming soon!
Ordering Info
Description | Part Number | Price |
---|---|---|
SD Card Module | GDL-STSDCARD-B | $00.00 |