add image, update format to mirror pico example

This commit is contained in:
rcarteraz 2023-07-14 15:19:13 -07:00
parent d4bb6ef727
commit 1ff86aa17a
2 changed files with 37 additions and 21 deletions

View file

@ -196,13 +196,7 @@ Default is to use RX GPIO 16 and TX GPIO 17.
### Interfacing PIR Sensor With External Microcontroller
The following is an example of using a Raspberry Pi Pico connected to a PIR sensor to detect motion. When motion is detected, a message is sent via. serial to the T-Beam. The T-Beam transmits the message as text over the default channel by utilizing the serial module in TXTMSG mode.
#### BOM
- Raspberry Pi Pico running [CircuitPython](https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython)
- T-Beam V1.1 running Meshtastic
- PIR Sensor ([Adafruit Breadboard Model](https://www.adafruit.com/product/4871))
The following are examples of using either a Raspberry Pi Pico or Arduino Mini Pro connected to a PIR sensor to detect motion. When motion is detected, a message is sent via. serial to the T-Beam. The T-Beam transmits the message as text over the default channel by utilizing the serial module in TXTMSG mode.
#### Meshtastic Software Configuration
@ -210,7 +204,13 @@ The following is an example of using a Raspberry Pi Pico connected to a PIR sens
- GPIO Pins (For T-Beam) RX 13, TX 14
- 38400 Baud
#### Wiring
#### Rasberry Pi Pico BOM
- A Raspberry Pi Pico running [CircuitPython](https://learn.adafruit.com/getting-started-with-raspberry-pi-pico-circuitpython)
- T-Beam V1.1 running Meshtastic
- PIR Sensor ([Adafruit Breadboard Model](https://www.adafruit.com/product/4871))
#### Raspberry Pi Pico Wiring
![image](https://user-images.githubusercontent.com/2799310/210852481-21ea76e5-ecaa-40c1-8f34-635ef2a1c95b.png)
@ -246,14 +246,31 @@ while True:
time.sleep(0.5)
```
#### Circuit .ino Code
#### Arduino Mini Pro BOM
- An Arduino Mini Pro with example sketch from below uploaded to it.
- T-Beam V1.1 running Meshtastic
- PIR Sensor ([Adafruit Breadboard Model](https://www.adafruit.com/product/4871))
```
#### Arduino Mini Pro Wiring
![image](/img/modules/Serial/arduino-mini-pro-pir-wiring.png)
- T-BEAM RX PIN 13 to TX PIN on the ARDUINO MINI
- T-BEAM TX PIN 14 to RX PINon the ARDUINO MINI
- T-BEAM PIN 3.3V to 3.3V PIN on the ARDUINO MINI
- T-BEAM PIN GND to GND PIN on the ARDUINO MINI
- ARDUINO MINI PIN 2 to OUT PIN on the PIR SENSOR
- ARDUINO MINI PIN 3.3V to 3.3V on the PIR SENSOR
- ARDUINO MINI PIN GND to GND PIN on the PIR SENSOR
#### Arduino Mini Pro Code
```c++
int LED = 13; // the pin that the LED is atteched to
int PIR = 2; // the pin that the sensor is atteched to
void setup() {
pinMode(LED, OUTPUT); // initalize LED as an output
pinMode(LED, OUTPUT); // initialize LED as an output
pinMode(PIR, INPUT); // initialize sensor as an input
Serial.begin(9600); // initialize serial
}
@ -271,4 +288,3 @@ void loop(){
}
}
```
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB