kandi X-RAY | flipdot Summary
kandi X-RAY | flipdot Summary
atmega - Controller software for the flipdot displays. dotflipctl - Controller hardware. flipper - Matrix hardware reverse engineered setup. flyboy - Flight simulator (ha!). qflipdot - Flipdot screen simulator. tetris - simple-tetris-clone, see: flipmos - flip(dot control via we)mos.
Top functions reviewed by kandi - BETA
flipdot Key Features
flipdot Examples and Code Snippets
Trending Discussions on flipdot
TLDR: I wanted to drive hardware with Python, and thought I'd need Arduino to get the job done. Turns out I could get the job done without Arduino at all, so the post below is strictly nonsense.
I am looking to interface with my first Arduino Uno board and would like to use Python for the task. I'm wondering if someone could help me convert a simple bit of Arduino / C to Python for the task. Any pointers would be greatly appreciated!
Here's the block I'm looking at:...
ANSWERAnswered 2020-Sep-25 at 13:42
I'm under the impression the pyserial package may allow me to send the same bytes through the same pin.
pyserial will let you send data out a serial interface. It has nothing to do with Arduino. If all you want is for this serial data to go to your display then there's no need for Arduino at all. Just connect your serial lines to the display and send serial data directly from the PC.
I also need to figure out how to replicate the setup and loop functions
That's very simple. Write the code that you want to run once first, and then put the code that you want run in an infinite loop into an infinite loop. while(1) works well to create an infinite loop. There's nothing special about setup or loop functions on Arduino. They're just regular functions that get called from the main function. setup gets called once and then loop gets called in an infinite loop.
It really isn't clear why you think you need to involve an Arduino here. If it is simply that you don't know how to connect things to a PC then perhaps a Raspberry Pi would be a better choice as it can both run python and has GPIO pins that you can connect things to. A second option would be to load firmata on the Arduino and use pyFirmata from python to control that. You can google both of those terms, there are lots of tutorials on how to do that.
I think you have some fundamental misunderstandings about what an Arduino does. Perhaps it would do you some good to spend some time away from this project learning some of the basics and then return to this once you have some experience and a little bit of understanding about what all of these things mean.
The larger question is why do you want to involve python? Is there a reason it needs to be controlled from a PC? Or is it just that you don't want to learn a new language? Those are two very different issues that would promt me to give you very different responses. If you need to be able to control the display from a PC then just do that and use your Arduino for something else later.
I have random ellipses been drawn in rows sequentially across 7 columns. However, instead of randomly drawing the number of ellipses anywhere within the row array I would like to only draw them so one of the ellipses in column one must touch one of the ellipses in column two etc. So that there are no gaps between positions. The end visual looking like a bar graph animating at different bar heights but using an array of ellipses to do so. Similar to this image. graph
My working code is below. Would I move to accessing the pixel colour value and doing an 'if condition' to compare if rowArray[i] is next to a black pixel or is there a simpler method I'm overlooking here? All help appreciated. Thanks....
ANSWERAnswered 2017-Jul-07 at 23:45
EDIT -it is now solved.Code posted below in case anyone else encounters similar troubleshooting.
Based on the advice above I have reworded the question:
I have tried creating a randomised array length and looping through this array to draw random x amount ellipses in a row. This visually translates to a series of white ellipses at differing heights like a bar graph. The minimal code below loops through the array length and successfully draws an ellipse at each pixel in the array length sequentially. This is what I want. However, because it is randomised it sometimes leaves a gap(a black pixel) between the ellipses. For example, in row 1 it may draw 3 white ellipses in sequence and then a gap of 1 pixel then a 4th ellipse in the length. I am trying to remove the 'gap'. This code achieves the 'one ellipse after another draw sequence' I am aiming for but has the black gaps in creating ellipses along the array length.
No vulnerabilities reported
Reuse Trending Solutions
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page