Coder Social home page Coder Social logo

Writing Array fails about bluebasic HOT 10 OPEN

aanon4 avatar aanon4 commented on July 20, 2024
Writing Array fails

from bluebasic.

Comments (10)

kscheff avatar kscheff commented on July 20, 2024

I found a workaround for the issue by not closing the file after WRITE and instead place a RETURN after it. My write routine runs then in a timer interrupt.

Update 30-Aug-2017: This issues is present for all READ and WRITE commands using an array variable as an argument since parse_variable_address() expects braces behind the array name. This leads to an ERROR_EXPRESSION to the following command.

Workaround: After such an command assign an expression with no evaluation requirement. This clears the previous error. See below example line number 30 for such a fix.

10 DIM V(2)
20 READ # SERIAL, V
30 E = E
40 PRINT V(0)
50 PRINT V(1)

It can be fixed in the BlueBasic_Interpreter.c extending the function parse_variable_address() to avoid parsing the index in such cases.

from bluebasic.

kaiateic avatar kaiateic commented on July 20, 2024

Hi Kai,

I think, in some cases, the interpreter goes on to the next command before it is finished with the current command. File IO might be one of them. Try putting DELAY 1000 before your CLOSE command and see if that fixes it.

BTW, we are considering porting BlueBasic to a more modern platform (cc2650). TI seems to be pushing that micro. Do you want to get involved?

Cheers,
Kai

from bluebasic.

kscheff avatar kscheff commented on July 20, 2024

@kaiateic this might be a test worth...
be aware there are other issues with the DELAY command when in a GOSUB during a GATT access.

I have looked into the cc2650 for some projects, so far ready modules with this device are rare and expensive (thus I can imagine TI is more interested in pushing this device to get out of the low margin cc2541 modules). However the cc2650 has some nice features like lower power and more processing.

I have the dev kit in my drawer.... so there is interest on my side.

Cheers
Kai

from bluebasic.

kaiateic avatar kaiateic commented on July 20, 2024

Great!

Let's take this conversation off line. Email me at [email protected]

from bluebasic.

ozarchie avatar ozarchie commented on July 20, 2024

from bluebasic.

kaiateic avatar kaiateic commented on July 20, 2024

Hi Ozarchie
Email me at the address above and lets take this offline.
Kai

from bluebasic.

kscheff avatar kscheff commented on July 20, 2024

@ozarchie
I couldn't find a module with the CC256x device. Currently I am getting CC2541 modules JPY-8 for < $2.30 in quantities of 10. If you a link for a CC256x device please send it to me.

TX Kai

from bluebasic.

ozarchie avatar ozarchie commented on July 20, 2024

from bluebasic.

kaiateic avatar kaiateic commented on July 20, 2024

Looks like there are a lot more FCC certified modules available using Nordic chips than TI. (If it doesn't have shielding, it's not fully certified.) Might be a better idea to port to Nordic instead?
Kai

from bluebasic.

kscheff avatar kscheff commented on July 20, 2024

Bugfix see here:
kscheff@447765a

from bluebasic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.