There are code with live video streaming + listening commands from port 400 and sending to serial.
Need add code to paire ps3 gamepad over Bluetooth. I can paire ps3 with esp32cam with example code from library.
But there is many errors when adding ps3conltroller library to code for vodeo streaming.
Help please.
There are code with live video streaming + listening commands from port 400 and sending to serial. Need add code to paire ps3 gamepad over Bluetooth. I can paire ps3 with esp32cam with example code from library. But there is many errors when adding ps3conltroller library to code for vodeo streaming. Help please.
ESP32Cam. Board "AI Thinker ESP32-CAM"
WiFi ESP32-CAM Controller on Android app..https://play.google.com/store/apps/details?id=com.fvasquez.esp32_wifi_controller&hl=en_US&gl=US
`/***** Rui Santos Complete project details at https://RandomNerdTutorials.com/esp32-cam-video-streaming-web-server-camera-home-assistant/
IMPORTANT!!!
After connecting GPIO 0 to GND, press the ESP32-CAM on-board RESET button to put your board in flashing mode
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. *****/`
`#include
int Flashlight = 4; bool Flashlightstatus=false;
void notify() { //--- Digital cross/square/triangle/circle button events --- if( Ps3.event.button_down.cross ) Serial.println("cross_on"); if( Ps3.event.button_up.cross ) Serial.println("cross_off");
} if( Ps3.event.button_up.up ){ Serial.println("up_off"); }
} if( Ps3.event.button_up.right ){ Serial.println("right_off"); }
} if( Ps3.event.button_up.down ){ Serial.println("down_off"); }
} if( Ps3.event.button_up.left ){ Serial.println("left_off"); }
if( abs(Ps3.event.analog_changed.stick.lx) + abs(Ps3.event.analog_changed.stick.ly) > 2 ){ Serial.print("lsx"); Serial.println(Ps3.data.analog.stick.lx, DEC); Serial.print("lsy"); Serial.println(Ps3.data.analog.stick.ly, DEC); }
if( abs(Ps3.event.analog_changed.stick.rx) + abs(Ps3.event.analog_changed.stick.ry) > 2 ){ Serial.print("rsx"); Serial.println(Ps3.data.analog.stick.rx, DEC); Serial.print("rsy"); Serial.println(Ps3.data.analog.stick.ry, DEC); }
}
void onConnect(){ Serial.println("Connected."); // Turn rumble on full intensity Ps3.setRumble(100.0, 1000); delay(500); // Turn rumble on full intensity indefinitely Ps3.setRumble(50.1000); delay(500); // Turn off rumble Ps3.setRumble(0.0);
}
void setup() { Serial.begin(115200);
pinMode(Flashlight, OUTPUT); }
void loop(){ if(!Ps3.isConnected()){ return; }
}
void Flashlights(void) { if (!Flashlightstatus){ digitalWrite(Flashlight,HIGH); Flashlightstatus=true;} else{ digitalWrite(Flashlight,LOW); Flashlightstatus=false;} }`