A place users can post their projects. If you have a small project and would like your own dedicated place to post and have others chat about it then this is your spot.

User avatar
By onehorse
#44153 I am working on an ESP8266 motor controller with a motion sensor hub and 2 DRV8837 H-bridge motor drivers on a two-wheeled Pololu robot platform. The board has a 5 V boost converter to make sure there is plenty of current even when the motors are driven at full speed. I plan to use RCKit to control the robot using an iPhone but haven't quite got that worked out yet. The trick is to use ESP8266 wifi instead of the Arduino wifi shield that the API was written for.
You do not have the required permissions to view the files attached to this post.
User avatar
By onehorse
#44705 I managed to get the RCTX code to work with the iPhone APP (thanks Greg!); it is actually pretty straightforward. The ESP8266 is recognized by the iPhone and the code receives UDP data packets from the iPhone app depending on the position of the joystick. The position data is 8-bit (1 byte) only so center position is 127 and left is 0 and right is 255, etc. This makes PWM programming easy but there is a mismatch between the 10-bit ESP8266 PWM and the 8-bit data of the app. I just did some simple scaling in the code but there are better ways to map the differences. So far I am only using one joystick for forward and backward for each of the two (left /right) motors. This is enough to give the robot a surprising agility for such a simple device.

I had to replace the 3xAA battery pack since it was not able to output enough current to power the ESP8266 consistently; it kept rebooting the ESP8266 and ran the motors at full power since the data stream returned always read 0 (full throttle). This is a data structure problem that I might work on if I continue to use this app. Anyway, replacing the battery pack with a 1S 3.7 V 350 mAH LiPo battery solved this particular problem; the robot + iPhone control app is working more or less as expected.