The main reason is that I couldn't find a way to simplify the cmd code and make a direct connection
like the serial monitor in the arduino IDE but thru windows cmd only.
Setting up the com port and sending data to test the it was easy:
but using that long code to send just data it's kinda not a good / nice way to write all the time
all that code ( set /p x="1" \.\COM4 ) just to send some data.
So is there any way to make a direct connection thru cmd or other already win. programs without installing other programs like Arduino IDE.
So is there any way to make a direct connection thru cmd or other already win. programs without installing other programs like Arduino IDE.
You can use a batch file like below to send characters out the com port. Note the comport will open and close, causing the arduino to reset, so the reset feature will need to be defeated.
I would recommend writing a short Python program to communicate with the Arduino. It can take care of the Arduino reset business if it needs to. Then you can call the Python program from the command line.
To give an example, I reinstall windows and there's no any extra programs, i need to plug my arduino and start communicating with it, with the already existing programs inside the new installed OS.
No installs, nothing. Just open existing software and start communicating.
As I gave an example in the 1st comment with cmd but there no direct open communication, I can only send, not receive. Is there is a possible way to have a portable serial communication when I may accept it.
If you want to do stuff native to windows, below is some old stuff from a long time back when I used the apache web server and batch files for web pan/tilt cams.
Domino60:
To give an example, I reinstall windows and there's no any extra programs, i need to plug my arduino and start communicating with it, with the already existing programs inside the new installed OS.
No installs, nothing. Just open existing software and start communicating.
Yes I know that there is that way but I need a direct opened connection and writing direct letters/numbers without any command, just like serial monitor.
Robin2
Yea I know Linux has the ability to do great stuffs really easy but I'm working on Windows only.
linux is definitely everything simpler .
For example you can create you a driver you maps to Arduino pins and use them directly as does the raspberry with gpio .
An example is the remoteGPIO to install and use it to read here
On Windows you can only emulate this mechanism .
Good luck for the sync command , remember that PCs are multitasking and two or more applications may call the device at the same time , difficult to manage with simple applications
what do you mean?
speak if the remoteGPIO go on a laptop ? Yes! It goes wherever located linux .
x86 , arm , etc ....
Once installed you'll get something like this:
odroid@odroid:~/Croject/remotegpio/src$ sudo insmod remotegpio.ko
odroid@odroid:~/Croject/remotegpio/src$ cd /sys/class/rgpio/
odroid@odroid:/sys/class/rgpio$ ls
board
odroid@odroid:/sys/class/rgpio$ echo "connect to=/dev/ttySAC0" > ./board
odroid@odroid:/sys/class/rgpio$ ls
a0.0 a2.0 a4.0 avr328p.0 d10.0 d12.0 d2.0 d4.0 d6.0 d8.0 eeprom.0
a1.0 a3.0 a5.0 board d11.0 d13.0 d3.0 d5.0 d7.0 d9.0
odroid@odroid:/sys/class/rgpio$ cd avr328p.0
odroid@odroid:/sys/class/rgpio/avr328p.0$ ls
drv lock mode option power ram subsystem timesleep uevent version
odroid@odroid:/sys/class/rgpio/avr328p.0$ cat ram
1326
odroid@odroid:/sys/class/rgpio/avr328p.0$ cat drv
id name nattr
0 servo 3
odroid@odroid:/sys/class/rgpio/avr328p.0$ echo "export 0"
export 0
odroid@odroid:/sys/class/rgpio/avr328p.0$ echo "export 0" > drv
odroid@odroid:/sys/class/rgpio/avr328p.0$ cd ..
odroid@odroid:/sys/class/rgpio$ ls
a0.0 a2.0 a4.0 avr328p.0 d10.0 d12.0 d2.0 d4.0 d6.0 d8.0 eeprom.0
a1.0 a3.0 a5.0 board d11.0 d13.0 d3.0 d5.0 d7.0 d9.0 servo
odroid@odroid:/sys/class/rgpio$ cd servo
odroid@odroid:/sys/class/rgpio/servo$ ls
angle attach detach lock power subsystem uevent
odroid@odroid:/sys/class/rgpio/servo$ cd ..
odroid@odroid:/sys/class/rgpio$ cd d13.0
odroid@odroid:/sys/class/rgpio/d13.0$ ls
mode power subsystem uevent value
odroid@odroid:/sys/class/rgpio/d13.0$ echo "output" > mode
odroid@odroid:/sys/class/rgpio/d13.0$ echo "1" > value
odroid@odroid:/sys/class/rgpio/d13.0$ echo "0" > value