WiFi controlled Buggy using Redkea (w/ Arduino code)


Arduino code for PIC32MX

The following code is for the Clicker 2 for PIC32MX:

Some comments and issues:

Serial is mapped to USB port (can be used for debugging). Serial0 is used by mikroBUS socket #1. Serial1 can be used by a click board installed into mikroBUS socket #2.

The frequency of PWM pins can be set using analogWriteFrequency(); PWM resolution can be set using analogWriteResolution();

The Buggy speed is inversely proportional to the PWM duty cycle. A higher PWM ratio will make the Buggy drive slower.

There is active turning (by varying the speed of the left and right motors) in active driving modes (both forward and reverse. There is also passive turning by breaking the left or right motors for the coasting modes when the buggy is driven by inertia.

When the direction of movement is suddenly changed (from forward to reverse or vice-versa) the Buggy will perform a full stop first. This is to prevent large current spikes when reversing the rotation of the motors.

There are four empty click sockets. Plenty of room to expand this project.

Have fun!!!


1 2 3 4

Leave A Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.