Skip to content

Add Simulator Stage 1 with SD card support#1

Merged
TylerFolsom merged 1 commit intoelcano:mainfrom
minigithubo:simulator-stage1
Apr 18, 2026
Merged

Add Simulator Stage 1 with SD card support#1
TylerFolsom merged 1 commit intoelcano:mainfrom
minigithubo:simulator-stage1

Conversation

@minigithubo
Copy link
Copy Markdown
Contributor

@minigithubo minigithubo commented Apr 17, 2026

Simulator Stage 1

Implements a Router Arduino Due program that simulates vehicle
sensor responses based on DBW inputs.

What this does

  • Reads throttle, brake, and steering signals from DBW Arduino
  • Computes vehicle speed using the throttle-to-speed model
    from Model for speed from throttle.docx
  • Tracks vehicle position (X, Y in meters), heading, and speed
  • Sends simulated wheel pulse and angle sensor values back to DBW
  • Logs CSV data to SD card if available, falls back to Serial

CSV output columns

time_ms, X_m, Y_m, heading_deg, speed_kmh, angle_deg, throttle, brakeOn

Testing

Tested with fixed throttle=150, no steering input.
Vehicle travels north at 25.69 km/h for 50 seconds (~351m).
Serial output confirmed correct speed model behavior.

Hardware required for SD card logging

  • 3 jumpers in parallel on JP2
  • Wire from Sensor Hub Pin 35 to TP12 (router pin D20)

output csv file

siumlaotr.csv

@TylerFolsom TylerFolsom merged commit 6bfa23b into elcano:main Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants