chrismicro / arduinoonpc Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Lesser General Public License v3.0
License: GNU Lesser General Public License v3.0
Hi,
I use a fork of your code which emulates FastLED instead of a tft, but ultimately works similarly:
https://github.com/MarcFork/FastLEDonPc
One thing I am however missing quite a bit is serial input. I use serial output like everyone else, but I also require input to control demo code in various ways.
I haven't been able to get serial reading working. Is it supposed to work, or known not implemented?
I use
if (Serial.available()) readchar = Serial.read();
Some code that does graphics loads graphics from "disk" before displaying it on neopixels/RGBPanels/TFT.
You are probably familiar with the "diskless" method that adafruit uses in
https://github.com/ChrisMicro/ArduinoOnPc/blob/master/examples/Adafruit_pictureDragon/Adafruit_pictureDragon.h
When doing animated gifs, we can do better.
On teensy, people read from sdcard
On ESP8266, ESP32 the more common way to do this is FatFS (which now replaces SPIFFS) from flash.
https://github.com/marcmerlin/AnimatedGIFs
supports all 3 methods.
If you want to see an example of API use, see:
https://github.com/marcmerlin/AnimatedGIFs/blob/master/FilenameFunctions.cpp
I think it would be best to emulate the ESP32 File API (the ESP8266 is a bit weird), so you can ignore the #ifdef FSOSD (filesystem object SDcard) an any ifdef ESP8266.
Full API test:
https://github.com/espressif/arduino-esp32/blob/master/libraries/FFat/examples/FFat_Test/FFat_Test.ino
And if you're wondering, yes, it's nice to emulate that code on PC, but it's even better to be able to run arduino code on Raspeberry Pi (which I can now do thanks to your code) on X11 using your driver (even if it's a bit slow as per #6 ) via my glue driver https://github.com/marcmerlin/FastLED_TFTWrapper_GFX or my new RGBPanel glue driver, which I just wrote: https://github.com/marcmerlin/FastLED_RPIRGBPanel_GFX
Any idea on how to emulate digitalRead in
https://github.com/ChrisMicro/ArduinoOnPc/blob/master/src/cores/arduino/wiring_digital.cpp#L35 ?
echo "1" > gpio_3
See also marcmerlin#8
Hi again,
I'm working on bringing a big library of APIs on top of your work (to allow developing on PCs for faster speed and debugging).
I've already done the work with a fork of your lib that uses SDL, but it's an old fork of your work that is lacking serial support plus a lot of code you added, and I'd rather have is depend on X11 instead of SDL.
The SDL version does work well and fast, though, it writes to an emulated neopixel 1D array that gets rendered into a 2D SDL matrix: https://github.com/MarcFork/FastLEDonPc
My concern at this point is that all my code relies on a framebuffer that is stored in memory and synced to the hardware backend when matrix->show() is called.
The only way I knew how to implement this is by calling XWindow::drawPoint_RGB for every dot, in the matrix, but it is very slow (0.2sec for only 160x120 resolution). See:
https://github.com/marcmerlin/FastLED_TFTWrapper_GFX/blob/2a2de242054f227f603156139b5bbeed6197193a/FastLED_TFTWrapper_GFX.cpp#L28
Is there a better way to give a precomputed square matrix in RGB888 to Xwindow without calling the slow draw pixel, pixel by pixel?
Thanks.
thanks to your tree, my fork has gone much farther than I'd ever imagine
https://github.com/marcmerlin/ArduinoOnPc-FastLED-GFX-LEDMatrix
end result allows running arduino graphics code on raspberry pi thanks to your code, and do pretty crazy stuff like
https://www.youtube.com/watch?v=PbuB-QE-WjQ
(more on http://marc.merlins.org/perso/arduino/post_2020-03-13_RGB-Panels_-from-192x80_-to-384x192_-to-384x256-and-maybe-not-much-beyond.html )
You probably didn't have this in mind when you started :)
Again, thanks a mil
while in french, we do say "deprecier", english spells it "deprecated"
this is used in a few places in comments, but also pathnames like src/system/depreciated/
It seems that src/system/depreciated is ok to delete, would you like me to send you a patch that deletes it and fixes the spelling elsewhere?
Obviously very low priority, feel free to close this without fixing if you wish.
Hi @ChrisMicro , are you able to help with this question: marcmerlin#11 ?
Hi Chris,
thank you so much for your awesome project! It is exactly what I was looking for for trying out different CBOR libraries and it works like a charm!
Just one quick suggestion: It is kind of self explanatory after some trial and error, but to make it easier for others you could include info on how to include other (non hardware dependent) libraries: copy them to the /libraries folder, copy the Makefile of one of the examples to your own sketch's folder, and add the relative path to the include file, including "src" if needed, e.g. like this: ARDUINO_LIBS += YACL/src
Thanks again
Jan
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.