Arduino EEPROM working???

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
407charles
Posts: 122
Joined: Thu Jun 26, 2014 12:01 pm
Has thanked: 41 times
Been thanked: 19 times
Contact:

Arduino EEPROM working???

Post by 407charles »

I'm having problems with the Arduino eeprom. I made a program to write names to create a name list and stored on EEPROM, also the program should show the list if is required. I'm not saying that my program is perfect but it looks like the eeprom component it's not writing to or reading from eeprom. I could be also making a mistake on my programming but I can not see it. During the run time of the program I'm monitoring ptr which is my eeprom memory address and it increments and decrements as needed but the read/write commands seem to not be operating. Also I tried with hardware and it's not working at all. It looses all data during reset. Please, I need help with this issue. All help is greatly appreciated.
Last edited by 407charles on Sun Feb 28, 2016 5:14 pm, edited 1 time in total.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Arduino EEPROM working???

Post by acestu »

Hi Charles,

Can you post your chart please and somebody will be able to help you better.

Thanks
Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

407charles
Posts: 122
Joined: Thu Jun 26, 2014 12:01 pm
Has thanked: 41 times
Been thanked: 19 times
Contact:

Re: Arduino EEPROM working???

Post by 407charles »

Thanks a lot. I already found the problem. It was on my programing (component set up).
Best regards.

User avatar
acestu
Posts: 1720
Joined: Thu Dec 01, 2011 9:36 pm
Location: Macclesfield UK
Has thanked: 783 times
Been thanked: 223 times
Contact:

Re: Arduino EEPROM working???

Post by acestu »

Hi Charles,

Glad to see you have sorted it out.

Stuart
Laptop Mac Book Pro i7 retina El Capitan //// Tower/Intel i7-Windows 7 64 Bit, Toshiba i5 Laptop Windows 10
Computers are like air conditioners. They work fine until you start opening windows.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Arduino EEPROM working???

Post by Benj »

Hello,

Glad you have the problem resolved.

The Console window works with the EEPROM component to show you the values when simulating. This may help you to troubleshoot any future programs involving EE memory.

407charles
Posts: 122
Joined: Thu Jun 26, 2014 12:01 pm
Has thanked: 41 times
Been thanked: 19 times
Contact:

Re: Arduino EEPROM working???

Post by 407charles »

Yes, It's how I was able to find my mistake. I found another example at the forum and that's how I did check this feature. Let me ask you a question, I have seen examples of macros with and without returned variable and they both work. I would like to know the difference in between both, so I can take the advantage of using it at the right application. Could you please explain? I appreciate your time. Thanks a lot for your support.

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Arduino EEPROM working???

Post by Benj »

Hello,

A macro can have parameters which are values passed into a macro and a return which is a value passed back from the macro.

In smaller or simpler programs you might use global variables in your program in which case the macros can all access the same variables and no parameters or returns are necessary.

However as the program gets more complex the global variables can cause problems in that they are always taking up space in memory and anything can change or edit their value meaning tracking down a bug can become very tricky.

The use of parameters and returns and other local variables allows the variables to only exist while you are inside the macro which can create space for other variables when you leave the macro. It also makes the system more straightforward and allows for much easier debugging of large complex programs. A final point is that they make the program more modular which allows you to cut and paste sections of code by exporting and importing macros.

The Flowcode components are great examples of this copy paste modular approach.

407charles
Posts: 122
Joined: Thu Jun 26, 2014 12:01 pm
Has thanked: 41 times
Been thanked: 19 times
Contact:

Re: Arduino EEPROM working???

Post by 407charles »

I got it. I really appreciate your help. Thanks for your support.

Post Reply