Botroniks Arduino codes for everyone = PCC1051A: Status display (open/close) of up to 4 digital inputs on a PC - FREE!

BotronikS - Final code for all types of Arduino and PC users: -- HOME -- CONTACT


misc: Wires: (link) 1--2--3
connections (click to enlarge)
- Need additional accessories:

PCC1051A: Status display (open/close) of up to 4 digital inputs on a PC - FREE!
The offered code shows the digital status of up to 4 inputs (0 = open 1 = close to 5V)
For Arduino boards:: NANO -- UNO -- MEGA
Arduino pins are used: A0=Input1 A1=Input2 A2=Input3 A3=Input4
Electrical note: (Recommendation:Use the following accessories for testing as well as for later use: Lnk1 - Lnk2 )
Connect each input pin to GND via 10K (3K3-10K) resistor (R1-R4).
When the input is connected to 5V, state = 1 (Sx closed) is detected. Otherwise state = 0 (Sx open).
It can only use PC-USB power or an external 9V (VIN) power supply. Note: The input pin voltage must not exceed 5V
Download the FreeHEX codes below, unpack and upload to the proper Arduino board (Use a free net tool for example XLoader)
1. uc ATmega328-16MHz-5V (NANO,UNO..): PCC1051A-M328
2. uc AtMega2560 (Mega(ATMEGA2560)....): PCC1051A-M2560
You can test the uploaded code using some free serial communication software such as Termite
Description of program commands
AT command (ASCII characters) - 9600 Baud ,8 Data bits,None Parity,1 Stop Bit - AT commands must be uppercase, lowercase invalid
AT - attention command (returns OK)
AT+INF - software code info (returns ucAppName)
AT+RVx - Reading value x (x=1-4) (returns Vx=0/1 0=open (0v) 1=close (5V))
For those familiar with ArduinoIDE programming: PCC1051A - PCC1051Azip
PC Application(s):
PC Application(s) (for WINDOWS): In order for the offered PC applications to work, it is necessary to download and install (only first time): VB6RunTimePlus2.2
Download the PC application, unpack and start (allow windows to start applications - how) enter the COM port number where the Arduino is connected and use that.
PC App: PCC1051A-PcApp1