Pages: [1]   Go Down
Author Topic: Text from .csv or .txt file  (Read 530 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey everyone! Just want to start off saying thank you for all the input you gave me, I now have an arduino uno!!!! and a LCD keypad shield.

MY QUESTION
I would like the Arduino to look for a .csv or .txt file on my computer say C: for instances. I would like it to display the text with in that file and show it on the screen.
It wont ever be more then 16 characters long and more then 2 rows. I would like it to reload the file every 60sec. and if it has been changed show the new text on the screen.
I will provide some code below that i am using now to make the screen work (i found this on google im still new to codeing and trying to learn~!)
Thank you for all your help again!

Here is the code i have now

Code:
#include <LiquidCrystal.h>

// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);

void setup() {
  // set up the LCD's number of columns and rows:
  lcd.begin(16, 2);
  // Print a message to the LCD.
  lcd.setCursor(0,0);
  lcd.print("Line #1 only 16.");
  lcd.setCursor(0,1);
  lcd.print("Line #2 only 16.");
}

void loop() {
}

Logged

Offline Offline
Edison Member
*
Karma: 19
Posts: 1041
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I would like the Arduino to look for a .csv or .txt file on my computer say C: for instances. I would like it to display the text with in that file and show it on the screen.

A serial device such as the arduino can't access files on your computer. You can write a program that runs on your computer that finds the file and sends it over the serial port to the arduino.
Logged

Tasmania - Australia
Offline Offline
Sr. Member
****
Karma: 16
Posts: 322
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
A serial device such as the arduino can't access files on your computer.
I have an idea that that statement is not necessarily correct, maybe true if you work with the Microsoft windows OS, but with other operating systems for instance, under Unix or Linux I dare say you can.

Paul
Logged


UK
Offline Offline
Shannon Member
****
Karma: 223
Posts: 12630
-
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would like the Arduino to look for a .csv or .txt file on my computer say C: for instances.

That looks like a Windows drive designation - is your PC running Windows? If so you can use Gobetwino to enable your Arduino to read the contents of a file on the PC.
Logged

I only provide help via the forum - please do not contact me for private consultancy.

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 652
Posts: 50869
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but with other operating systems for instance, under Unix or Linux I dare say you can.
You want to back that assertion up with some Arduino code that talks to the serial port and actually makes the serial port, that nothing is listening to, access a file on the PC and spool its contents back?
Logged

0
Offline Offline
God Member
*****
Karma: 39
Posts: 988
Get Bitlash: http://bitlash.net
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

An approach I use successfully here is to use a program on the PC to push Bitlash commands from a file on the PC to Bitlash on the Arduino.  But it doesn't have to be Bitlash, it could be your arduino code.

I use a python program I wrote named bloader.py to do this.  You can get it here: https://github.com/billroy/bloader.py -- you would need to install a couple python modules and find your way around in python a little bit to use it.  If a different language is more comfortable for you, search the forums; sending commands and data from the PC over the serial port is a frequent request.

-br
Logged

Pages: [1]   Go Up
Jump to: