Skip to Content
ESP8266 Robotics Projects
book

ESP8266 Robotics Projects

by Pradeeka Seneviratne
November 2017
Beginner
210 pages
4h 41m
English
Packt Publishing
Content preview from ESP8266 Robotics Projects

Listing 3-1 – Displaying average of the pulses generated by the two wheel encoders (the hall-effect sensors)

 The following is the counting of the average pulses generated by the wheel encoder:

#include <ESP8266_Lib.h>#include <BlynkSimpleShieldEsp8266.h>#include <SparkFun_TB6612.h>char auth[] = "53e4da8793764b6197fc44a673ce4e21";char ssid[] = "YourNetworkName";char pass[] = "YourPassword";#include <SoftwareSerial.h>SoftwareSerial EspSerial(2, 3); // RX, TX#define ESP8266_BAUD 115200ESP8266 wifi(&EspSerial);#define AIN1 12#define BIN1 7#define AIN2 4#define BIN2 8#define PWMA 5#define PWMB 6#define STBY 9const int offsetA = 1;const int offsetB = 1;Motor motor1 = Motor(AIN1, AIN2, PWMA, offsetA, STBY);Motor motor2 = Motor(BIN1, BIN2, PWMB, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Raspberry Pi 3 Home Automation Projects

Raspberry Pi 3 Home Automation Projects

Shantanu Bhadoria, Ruben Oliva Ramos
Wheeled Mobile Robotics

Wheeled Mobile Robotics

Gregor Klancar, Andrej Zdesar, Saso Blazic, Igor Skrjanc

Publisher Resources

ISBN: 9781788474610Supplemental Content