Equip your Genius
Welcome to the Parallax Discussion Forums, sign-up to participate.
Learn with BlocklyProp
How to read text files from PC
2019-08-06 - 13:13:21
I want the propeller activity board to read a text file on my laptop and do some task according to the value it reads. The text file content changes regularly.
2019-08-06 - 14:03:45
How big is the text file? How would the laptop and Activity Board be connected? Can the laptop be running a service program "in the background"? For example, could you have a web page open in a browser all the time?
2019-08-06 - 18:06:40
As Mike indicates, you will need some type of program running on the laptop, to accomplish this task. This program would need to open the file, read the file, close the file, and serially transmit the data to the activity board.
If you are capable of programming in C++, this link will help with the serial transmission part of things:
. At this link, you will find a program which can be altered for opening, reading, and closing files, as well as serially transmitting the data.
2019-08-06 - 21:36:10
I wonder if you could use IIS (if Windows) to setup an intranet server with a web page that provided access to the text file...
Then, maybe the WiFi module (if WX version of activity board) might be able to access this website?
Seems like it should work... Have to be careful with security though...
2019-08-07 - 08:04:00
Wonder whether the Wi-Fi SD cards for cameras can be a solution? With those things, a PC can just write the file via Wi-Fi, leaving the Propeller to just read the SD card over and over.
Here is a link to one.