NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.
Microcontroller Programming » Programming with graphics
November 19, 2014 by jmuthe |
One project that I would like to try is that I would like to create a program where a user is shown a blank sheet music on their computer screen and then they could create their own sheet music on the screen. Once the user creates a sheet music for their song, the song information would transfer to the microcontroller and then the microcontroller would play that song on a speaker. In this following thread http://www.nerdkits.com/forum/thread/2802/ I was explained how to transfer information from text files to the microcontroller. However, I want to create a code that would actually generate an image, which would be the sheet music, and transfer that information to the microcontroller. Therefore, I need to know how to use code to create images. Firstly, what is the best programming language to do this? Since I am learning C for the Nerdkit, then C language would be best for me and if it is possible to do this in C then I will use C. I also saw some Youtube videos of people using C to make graphics so I think it is acceptable. However, if you think that it would be more practical to learn another programming language to do this, then let me know. Secondly, what compiler would be good to use these graphics? Thirdly, what book would you recommend for a beginner trying to learn to program using graphics? |
---|---|
November 20, 2014 by Ralphxyz |
I would look at Python it has some very robust graphics programming available plus a great community to help, they like challenging questions. |
November 21, 2014 by jmuthe |
When somebody has to program with graphics, could they do the same things in C programming that they could do in Python or are there some graphic functions they could do in Python that they can't do in C programming. For example, if I want to create the program with the sheet music graphic, would it be possible to do it with C or possibly C++? I only ask because, like I said in the first post, I know a little about C and even c++ but know nothing about Python. However, if it is impossible or extremely hard to do in C/C++ then I would be willing to learn Python. |
November 22, 2014 by Ralphxyz |
C does not have the graphic libraries, at least not natively you might be able to find some. C++ is more than capable. Python is just easier, spoken by a person who has little Python experience but what I have done worked great and was relatively easy to learn. |
November 22, 2014 by JimFrederickson |
There is "learning C" and then there is "learning C for the environment you are In programming in C for the Microcontroller "C" is the singly most dominant element. The "environment your are programming for" is the Micrcontroller and it's very limited, Any "Programming Environment" has an set of "API's". ("Application Programming These are, essentially, standard functions that can be used to get the Environment you The closest analogy for the Nerdkit are the Functions used for writing data to the In Windows... There is a plethora of API Functions that are available. So the answer to your question is "Yes, it is possible to do what you want in C". But... It may not be, as you contend, "C Language would be best for me"... Programming stricly in "C for Windows" is quite tedious. (Which in large part is why Of course there are many "Frameworks" that can be employed to make it less I would DEFINATELY recommend Python as Ralph already has. I use JAVA alot as well, but Python is much more capable of running programs unchanged Python is INCREDIBLY FAST and there are a multitude of 3rd Party Libraries too. DEFINATLEY stick with Python 3.x. |
November 24, 2014 by jmuthe |
Okay thank you for the advice. I just downloaded the python 3.4.2 and so far find that it is actually easier to work with then other programming languages. I am working with the basics now and will eventually try to learn graphics. |
Please log in to post a reply.
Did you know that sound travels via pressure waves in the air, and you can make these with a piezoelectric buzzer? Learn more...
|