actualizacionv2
This commit is contained in:
5
ESP8266/I2C/.gitignore
vendored
Executable file
5
ESP8266/I2C/.gitignore
vendored
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
.pio
|
||||||
|
.vscode/.browse.c_cpp.db*
|
||||||
|
.vscode/c_cpp_properties.json
|
||||||
|
.vscode/launch.json
|
||||||
|
.vscode/ipch
|
||||||
16
ESP8266/I2C/platformio.ini
Executable file
16
ESP8266/I2C/platformio.ini
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
;PlatformIO Project Configuration File
|
||||||
|
;
|
||||||
|
; Build options: build flags, source filter
|
||||||
|
; Upload options: custom upload port, speed and extra flags
|
||||||
|
; Library options: dependencies, extra library storages
|
||||||
|
; Advanced options: extra scripting
|
||||||
|
;
|
||||||
|
; Please visit documentation for the other options and examples
|
||||||
|
; https://docs.platformio.org/page/projectconf.html
|
||||||
|
|
||||||
|
[env:nodemcuv2]
|
||||||
|
platform = espressif8266
|
||||||
|
board = nodemcuv2
|
||||||
|
framework = arduino
|
||||||
|
monitor_speed = 115200
|
||||||
|
upload_speed = 256000
|
||||||
38
ESP8266/I2C/src/main.cpp
Executable file
38
ESP8266/I2C/src/main.cpp
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#include <Arduino.h>
|
||||||
|
#include <Wire.h>
|
||||||
|
|
||||||
|
void setup()
|
||||||
|
{
|
||||||
|
|
||||||
|
pinMode(D0, OUTPUT);
|
||||||
|
Serial.begin(115200);
|
||||||
|
Wire.begin(D2, D1); /* I2C bus SDA=D2 and SCL=D1 */
|
||||||
|
}
|
||||||
|
|
||||||
|
void loop()
|
||||||
|
{
|
||||||
|
byte error, address;
|
||||||
|
int nDevices;
|
||||||
|
|
||||||
|
Serial.println("Escaneando...");
|
||||||
|
Serial.println("**************");
|
||||||
|
|
||||||
|
nDevices = 0;
|
||||||
|
for (address = 1; address < 127; address++)
|
||||||
|
{
|
||||||
|
|
||||||
|
Wire.beginTransmission(address);
|
||||||
|
error = Wire.endTransmission();
|
||||||
|
|
||||||
|
if (error == 0)
|
||||||
|
{
|
||||||
|
Serial.print("Encontrado dispositivo I2C dirección 0x");
|
||||||
|
if (address < 16)
|
||||||
|
Serial.print("0");
|
||||||
|
Serial.println(address, HEX);
|
||||||
|
nDevices++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Serial.println("**************");
|
||||||
|
delay(2000);
|
||||||
|
}
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
+ RASPBERRY PI PICO
|
+ RASPBERRY PI PICO
|
||||||
|
|
||||||
### PinOUT PICO
|
### PinOUT PICO
|
||||||

|

|
||||||
|
|
||||||
### Data
|
### Data
|
||||||

|
[SDK](data/PICO_C_SDK.pdf)
|
||||||
|
|||||||
BIN
PICO/Raspberry-Pi-Pico-pinout-diagram.png
Normal file
BIN
PICO/Raspberry-Pi-Pico-pinout-diagram.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 382 KiB |
Reference in New Issue
Block a user