This is Texas Instruments MSP-EXP432 multitasking tutorial. Here you can see how to run multiple sketches that can communicate with main sketch, where all global variables are defined. Software used for this project is Energia. It's IDE very similar to Arduino IDE, but you must download some drivers too.
We will use ultrasonic and color sensor simultaneously. They won't interrupt each other. If ultrasonic sensor distance is under 5 cm and if color sensor detects red value under 60, LED will turn on.
Ultrasonic sensor:
- GND ---> GND
- VCC ---> 5V
- Echo ---> 36
- Trig ---> 38
Color sensor:
- GND ---> GND
- VCC ---> 5V
- OUT ---> 34
- S0 ---> 35
- S1 ---> 37
- S2 ---> 39
- S3 ---> 40
LED:
- GND ---> GND
- pin ---> 33
Comments