Comments (6)
Hello and thanks for your note.
You can modify Bitlash so it doesn’t echo characters (though this will make it more difficult to use manually, of course).
In src/bitlash-cmdline.c at line 117 you will find the “spb(c)” that echoes the input character back over the serial link. Comment that function call out and you should be good to go.
Happy to take followup questions if that doesn’t work for you.
-br
On Mar 12, 2015, at 9:46 PM, borgdrone7 [email protected] wrote:
Hi,
I am trying to use bitlash with C#. Everything is perfect and works except one thing which ruins everything for me. Bilash by default thinks that I am in terminal and echos my commands and > sign. However in order for it to be usable when talking with C# program over serial it must send only result of the command. Currently when I write printf("a0:%d", a0) as a response I will get:
printf("a0:%d", a0)
a0:551I want to get:
a0:551I am sure I am missing something obvious but I cannot seem to find a solution. Whats the catch?
Thanks in advance!
—
Reply to this email directly or view it on GitHub #43.
from bitlash.
Hi,
Thank you very much for quick answer. Commenting that line solved echo, however there is still "> " which "pollutes" the output. How can I remove that too? I just want result of the command.
I think you should add something like flag or if we define NO_CONSOLE for example that there is no echo and "> " sign.
Another question is, is it possible to upload function but that it is not automatically saved to EPROM? That way I can define all functions in C# strings and every time connection is started just send them with no need for big EPROM, so I could have more functions than what can fit there.
Thanks again for making so wonderful library. I looked at all libraries out there and I think yours is by far the best.
from bitlash.
You can suppress the prompt by defining an empty function named “prompt”:
function prompt {}
Your question about functions “not saved to EEPROM” puzzles me. Where would you suggest to store them? It would be possible to store them in RAM, I suppose, on the larger-ram Arduinos.
-br
On Mar 13, 2015, at 3:46 PM, borgdrone7 [email protected] wrote:
Hi,
Thank you very much for quick answer. Commenting that line solved echo, however there is still "> " which "pollutes" the output. How can I remove that too. I just want result of the command. Another question is, is it possible to upload function but that it is not automatically saved to EPROM. That way I can define all function in C# strings and every time connection is started just upload them with no need for EPROM, so I could have more functions.
Thanks again for making so wonderful library. I looked at all libraries out there and I think your's is by far the best.—
Reply to this email directly or view it on GitHub #43 (comment).
from bitlash.
Hi,
Yes, Arduino Mega has 8Kb of SRAM and 4Kb of eprom. As for prompt, I figured it out on my own and came here to let you know, and saw your answer :). I am getting one extra newline in output, maybe it is due to my code on client side. Do you send extra newline together with response sometimes or it is always just one to end the response? I am sending "print a0" and sometimes I get "\r" first and then "531\r" and sometimes I get immediately "531\r".
from bitlash.
It may help to comment out the call to speol() at line 150 in src/bitlash_cmdline.c - this is generated when /r or /n is entered.
The print command normally generates one newline at the end of the output unless you end the print command with a comma.
The printf() function gives you complete control over whether or not there’s a newline at the end.
-br
On Mar 13, 2015, at 4:04 PM, borgdrone7 [email protected] wrote:
Hi,
Yes, Arduino Mega has 8Kb of SRAM and 4Kb of eprom. As for prompt, I figured it out on my own and came here to let you know, and saw your answer :). I am getting one extra newline in output, maybe it is due to my code on client side. Do you send extra newline together with response sometimes or it is always just one to end the response? I am sending "print a0" and sometimes I get "\n" first and then "531\n" and sometimes I get immediately "531\n".—
Reply to this email directly or view it on GitHub #43 (comment).
from bitlash.
I will try it (speol) thanks.
from bitlash.
Related Issues (20)
- run bitlash code stored in flash HOT 5
- eeprom overflow error with bitlash run command for a user defined function HOT 3
- Blank user function causes following functions not to appear HOT 2
- Port to spark-core or esp-8266 HOT 7
- Not working on new Arduino.. HOT 9
- Can't save user functions to startup? HOT 27
- Deleted-cant add user functions to memory
- Cant add more then 9 commands inside startup functions
- No support for bypass serial
- Serial flash support? HOT 2
- No need to wait after Wire.requestFrom().
- LED was very dim when using bitlash HOT 1
- bitlash demo - blink does not blink HOT 5
- Problem of output buffer when using bitlash
- ========^ unexpected number error for functions HOT 5
- Run code from eeprom HOT 2
- Make SdCard example code use IDE's inbuilt SD API
- Maintained fork?
- update library for support lastet arduino ide version
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitlash.