Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Create a txt file on ItsyBitsy M4 Express 2MB chip
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Create a txt file on ItsyBitsy M4 Express 2MB chip

by Ketechi on Wed Jul 22, 2020 8:18 pm

Hi everyone,

I am new in the forum, in programming, and also new with Adafruit devices and so far its been a fun experience.

For a while, I have been searching on google on how to create text files with the Arduino language but the answers I been finding do not answer my main question.

I currently have the Adafruit ItsyBitsy M4 Express featuring ATSAMD51 link: https://www.adafruit.com/product/3800

On the website it says that the M4 has "2 MB SPI FLASH chip for storing files and CircuitPython code storage". I am trying to find a way I can write a code that can read a txt file or even create a txt file with the Arduino language.

Can this be possible with the Arduino language?

Here is an example in python, my goal is to replicate the same code but with the Arduino language:

Code: Select all | TOGGLE FULL SIZE
file = open('read.txt', 'r')

letter = file.readline()

if letter == 'a':
    print(letter)
    file.close()
    new_file = open('read.txt', 'w')
    new_file.write('b')

elif letter == 'b':
    print('found letter "b"')

else:
    print('no letter found')


Thanks in advance.

Ketechi
 
Posts: 1
Joined: Wed Jul 22, 2020 7:33 pm

Re: Create a txt file on ItsyBitsy M4 Express 2MB chip

by adafruit_support_carter on Thu Jul 23, 2020 12:36 pm


adafruit_support_carter
 
Posts: 16919
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.