Skip to content

sarahgarlough/arduinobot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

ArduinoBot

This is a repository for the code running on an arduino robot destined for solving a maze using a stack and retreat technique.

Solving technique

The maze is solved by tracking what has been executed on a stack, and when a dead-end is reached, retreating to the previous decision and taking the opposite.

This is done by storing a function pointer (and associated argument, all instruction functions take a single int) on a stack, where when popped and executed, this function will undo the action that was just done.

Stack

The stack is present in stack.c, and is a raw stack of structs (stackElements). There are helper functions to push and pop to the stack, and they both take a pointer to a stack struct (which MUST be set up appropriately).

About

It's a line leader, not a line follower

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 57.1%
  • C++ 42.9%