ESP32cam add MCP23017 GPIO expander to program and add digital read/write to code
$30-250 USD
货到付款
Using this tutorial as a base for the project - [login to view URL] - update to use a MCP23017 GPIO expander (I2C device) - and add digital read/write to code.
Using the adafruit MCP23017 ("Adafruit_MCP23017.h") library (and wire.h or similar library if needed to map I2C pins).
Using this board - [login to view URL] .
Need to map I2C (SDA and SCL pins - suggested using pins 12/SDA and 14/SCL - or other suitable/available pins on the esp32cam - I should not have to do any soldering - or modifications to board!!)
Note - I do not need physical device made or anything else - just code!!
Need to use Arduino IDE - so similar language as tutorial: [login to view URL]
MUST update tutorial code to add digital read/write to MCP23017 ... see sample read/write code below.
Must be able to view webcam and do digital read/write.
*************
// Test circuit for esp32cam
// and MCP23017 GPIO Expander
// Standard SDA is 21 and SCL is 22
// Use wire.h to change SDA SCL pins...
// When Flashing - put USB SDA SCL pins for esp32 on SDA 21 and SCL 22
// When Flashing - put USB on standard flashing pins...
#include <Wire.h> // set [login to view URL](SDA, SCL)
#include "Adafruit_MCP23017.h"
Adafruit_MCP23017 mcp; // Instantiate mcp object
int dly = 500; // 1/4 second delay
void setup(){
[login to view URL](115200);
[login to view URL]("Setup starting: Ready");
[login to view URL](12, 14); // NOTE '//' out [login to view URL] in [login to view URL] library! Or will not map pins!!
[login to view URL](); // "Start" the mcp object
[login to view URL](0, OUTPUT); // relay
[login to view URL](1, INPUT); // push button - green
[login to view URL](1, HIGH); // turn on a 100K pullup internally
[login to view URL](2, INPUT); // touch sensor - filzer custom
[login to view URL](2, HIGH); // turn on a 100K pullup internally
}
void loop(){
// Digital write test - for Relay testing
[login to view URL]("Relay - Flashing GPIO: "); // Tell us what pin is flashing.
[login to view URL](0, HIGH); // Set pin HIGH (on)
delay(dly); // On for 1/4 second
[login to view URL](0, LOW); // Set pin LOW (off)
delay(dly); // Off for 1/4 Second
// digit read test - for push buttons x2
int val1 = [login to view URL](1); // Read the value of pin P1
int val2 = [login to view URL](2); // Read the value of pin P2
if (val1 == HIGH) [login to view URL]("Button: HIGH"); // If Button is Pressed
else
[login to view URL]("Button: LOW"); // When Button is Released
delay(50);
[login to view URL]("\t");
if (val2 == HIGH) [login to view URL]("Touch Sensor: HIGH"); // If Button is Pressed
else
[login to view URL]("Touch Sensor: LOW"); // When Button is Released
delay(50);
[login to view URL]("\t");
[login to view URL]();
}
项目ID: #23190812
关于项目
授予:
Hi, Let's get started. I have used Arduino in both hardware and firmware development since 2013, and in recent years, I've been heavily using ESP32 in both hardware and firmware development. I'm familiar with their ar 更多
有17名威客正在参与此工作的竞标,均价$157/小时
Hello, my name is Maria. I am an electronic engineer I would like to know more about your project. Let me know on chat.. I am available to work in this
Hi, I hope you are doing well. I have expertise in ESP32 Arduino Programming. I have worked on I/O expander. I have reviewed your requirements. I have several questions regarding project. Which is what do you want t 更多
hello. I have 10+ years experiences related to hardware and firmware development. - Electronics circuit design(schematic, PCB, simulation) - Microcontrollers(Microchip PIC, ARM, AVR, 8051) - Arduino projects(LED, vario 更多
Am a Mechatronic engineer with 5 year experience in microcontrollers and Arduino programming and I believe i can handle your task to perfection
I am an electrical engineer and interested in your project. I have read the description of your project. Kindly send me text to discuss the project in details. Thanks
Hey there Hope you are doing good I read the details about your project, I am skilled electronics and communication engineer, with experience in microcontroller programming, circuit designing and etc. i worked on proje 更多
Hi I am embedded system engineer with 7 years of experience. I used esp32 for main controller of several project. I used arduino to develop the firmware and i am familiar with I2C, let me know if you are interested
HI, I am kahan. I am embedded developer and have much experienced in hardware and software side. Waiting for further discussion. Thank you.
Hello. I am a senior Microcontroller developer and electronic engineer. After reading your description, I am very interested in your project. As you can see in my profile, I have developed the IoT and website , mobile 更多
Hi, I have experience in arduino and esp8266 based devices. I can do your project comfortably in three working days. thanks in advance
Hi sir, I worked with both Arduino and Esp. Currently working on 1. Esp32 - mqtt and Android communication. 2. STM32 - Lora P2P communication. We will work on your project and will give you the output as you expect.