Lego Mindstorms Programming - which language/IDE do you use/recommend? [closed] - programming-languages

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
I'm new to it and currently using the visual flow-chart like language that the Lego Mindstorms IDE uses. I'm impressed with how readable the diagramming language is but missing the flexiblity of actual code. I'm imagining complicated projects I want to try out and don't really want to implement them as a gigantic flow chart! lol :)
I know there are other languages/IDEs you can use but not really sure what they are or which to use. What IDE/language do you recommend for programming Lego Mindstorms projects?
I'd prefer an IDE that still allows me to hit Run and send the program down to the NXT brick via bluetooth and run it immediately.
UPDATE:
I ended up choosing lejos. Mainly because I've just started learning Java at work which is very similar to C# which I'm already familiar with. I would recommend Lejos since Java is a great high level, feature-rich language and there are nice IDE's for it. Eclipse is a great IDE which lejos has a plugin for and ant build scripts make building your project, loading it to the NXT brick and running it on the device a one step process. Lejos does require special firmware on your NXT brick but that went fine and you can always put your old Mindstorms firmware back on later if you want.
If you want to check out other language and IDE options I'd highly recommend this chart I stumbled across: http://www.teamhassenplug.org/NXT/NXTSoftware.html

FYI, I came across this extremely helpful feature comparison chart of different languages which you can program the NXT in:
http://www.teamhassenplug.org/NXT/NXTSoftware.html

Another option is Microsoft Robotics Studio.

I think this is a good book about programming your Mindstorm NXT with the NXC (Not eXactly C) language.
"LEGO Mindstorms NXT Power Programming: Robotics in C" by John C. Hansen
With a small amount of tinkering you can probably get NXC working with whatever your favourite IDE already is.

We used NQC for programming Lego Mindstorms. We was to build a four-wheel robot to gather artificial rubbish(pieces of bead and paper) in a competition. After testing different programming and IDEs I concluded NQC was right to me.(because I knew C and NQC had many good tutorial materials).
And the point is that you can modify your code easily with NQC. For example, at the competition, we should change our code in oder to cope with new challenges in our robot's environmetn( they changed MDF with carpet!)
by the way, We obtained a good result (third place) :)

MATLAB actually has a LEGO MINDSTORMS NXT Toolkit, if you're interested at all in using MATLAB. You can send commands via Bluetooth connection or create embedded controls that are downloaded to the robot. I've seen it discussed on some of the MathWorks blogs, and there are some demos posted on the MathWorks File Exchange (here's one).

You can use nxtOSEK as operating system on the NXT. Then you can use plain C to write your code.

Back in the day, NQC was the way to go; A good intro to C style programming, with fewer pitfalls.

Related

Which FRP package to choose? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm just starting to look into the world of Functional Reactive Programming in Haskell, and I would like to experiment with GUI programming (with gtk, because of substantial binding) in a reactional setting.
Now, I've been looking a bit at Grapefruit, Reactive-Banana and Buster, and I would like any testament to the joy/horror of using any one or other package.
All I have is these preliminary oppinions:
I don't mind doing some of the binding of the FRP package to gtk myself, as I have an ambivalet feeling about the abstracted backend idea (that Grapefruit has)..
While I find type theory interesting, I also value simple encodings for actual programs, which seems to put grapfruit-records a bit off..
That is, unless of course some of you persuades me to think otherwise :-)
If you just want to use regular FRP, and stay close to the GUI framework rather than using a "pre-made" abstraction over it, reactive-banana is the most viable option, in my opinion. It's explicitly geared around binding to existing frameworks, is designed for "real-world" use (not doing anything too experimental, semantically, that could cause problems), and so on.
You can take a look at reactive-banana-wx to see how to bind an event-based framework to reactive-banana. It's very simple; I wrote a quick binding to Gtk2Hs once (lost the code now, unfortunately), and the file didn't go over 50 lines. It was almost a direct transliteration of the reactive-banana-wx code.
I would recommend against using Buster, for the simple reason that it hasn't been updated since 2009, and doesn't build on GHC 7.
Other "production-oriented" FRP frameworks are sodium (similar to reactive-banana, but it has dynamic event switching (which is coming to reactive-banana soon, but isn't in yet) and a concept of "partitions" for concurrency; however, it's just come out and hasn't seen adoption yet) and netwire (arrowised FRP, quite a different creature to reactive-banana and sodium).
I've been experimenting with FRP myself and so far the only one that's worked for me is Reactive-Banana. I never looked into Grapefruit or most of the others because they were out of date and didn't seem like they were likely to be updated or supported at all. I did briefly look at netwire, but frankly all the arrow theory in it put me off and I had a lot of trouble figuring out how to do even simple things.
In contrast I've managed to get a pretty good set of bindings to SDL written in Reactive-Banana with only a few hiccups along the way. Another thing in favor of Reactive-Banana is that Heinreich is very active in the community and will often provide helpful answers when you run into problems. Just look through the various reactive-banana questions on here and you'll see he's responded to quite a few of them and he's usually very active in FRP discussions in the Haskell mailing lists.

What language was used to program the 'Angry Birds' app? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I've never programmed a game, but have about a dozen years programming interfaces. After playing a few games on my Android phone, I'm stuck wondering what language is used to program games like Angry Birds, and how such graphical manipulation can happen. Native languages or some cross-platform code?
Thank you!
I'm not sure but considering that quite a few .lua files are inside the angry bird app folder, I'd say they used LUA at some aspects.
But from what I've heard, LUA isn't a primary language, just something to script with.
That said, I'm not a obj-c programmer either, so take my word with a grain of salt.
Follow up link
https://web.archive.org/web/20120502071633/http://blog.anscamobile.com/2010/04/lua-the-lingua-franca-of-iphone-games/
Android apps are coded in Java with the android development kit, iphone games are coded in objective c
Android dev kit is available here
http://developer.android.com/index.html
iphone (iOS) development kit available here (Caution requires a mac)
http://developer.apple.com/devcenter/ios/index.action
As the two languages are both based on the C syntax there's a lot of cross compatibility between the basic parts of your code however the interactions with the phone are both done through the respective sdk's so you're gonna have to make changes to account for that. Also worth bearing in mind is that objective c on the iphone isn't garbage collected so you'll need to worry about memory management!
AngryBirds (and some other games) are using C/++ code and the NDK. Sources: What language was used to program the 'Angry Birds' app?, http://www.gamasutra.com/view/feature/6481/postmortem_vector_units_riptide_.php
Has to be C for the core at least. If I was them I would write the core in C and wrap java around it for android (I think you can do that) and objective c for the iPhone (I know you can do that).
I always assumed that these developers program core functionality in c/c++ and then use native development kits to link the two. For example I know in android development you can use the NDK to wrap java around c/c++
http://developer.android.com/sdk/ndk/index.html
Ironically Java isn't the "build once, run every everywhere" language in this case :p

Music Visualization [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I am intrested in learning about Music Visualization.
(eg: http://en.wikipedia.org/wiki/Music_visualization )
Does anyone have any books to recommend on the subject?
(I know its not a technical question, but it seems like a good place to ask)
Many thanks
You're in luck--it's a great time to get involved in the medium. Lots of new open source multimedia platforms are available now, with great communities forming around them--making it much easy to get something up and running.
I'm not aware of any books specifically on audio visualisation, but I think you'd be well served by reading more general material on:
computer graphics in general
graphic design (color, form, etc)
data visualisation
any of the great new open source multimedia platforms
If you're writing a visualization plugin for a media player, the problem can usually be treated as mapping FFT data and time to pixel space. You get the time and FFT data nearly for free, so the remainder of the problem is graphics programming, visual design, musical sensitivity and imagination. The way you combine these will ideally be your own.
You can expect to find lots of great information, tools, examples and communities surrounding any of the modern open source multimedia platforms:
processing.org -- a Java based platform which makes it really easy to get your works (called "sketches") up and running, with plenty of examples. You could plug in a library like minim to get the audio FFT parts for free
openFrameworks and libcinder -- C++ based platforms. If you want to write plugins for a media player like iTunes, you may need to use a language like C++. If you already know (or want to learn) C++, both are good choices.
I'd recommend jumping straight in with a platform like processing.org, together with a library like minim, play with the bundled examples, and build your knowledge from there.
There are quite a few books on processing if that suits your learning style.
If you want to stay current, blogs like createdigitalmotion are a great resource.
Also check out artists like flight4040 and Memo Akten who are using these frameworks.
Hope that helps.
Check this fantastic blog post:
http://www.ethanhein.com/wp/2011/visualizing-music/
There is also some great material on this book:
http://www.amazon.com/gp/aw/d/0060926716/ref=aw_d_detail?pd=1
The author also has a website with some examples.
http://www.constructingtheuniverse.com/Amen%20Break%20and%20GR.html
Happy visualizing

Yet Another diagram / modeling software suggestion request [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm currently looking for diagramming software that allows me to quickly map stuff and jot down concepts such as a filesystem directories represented by nested boxes containing icons (representing files.)
Off course the simplest solution of all would be to just use paper and pencil, but unfortunately i have such poor motor skills that after minutes i cannot even distinguish the shapes I've drawn myself, never mind have these notes be of any use to someone else in order to have him/her work with them.
So far I've tried a ton of software packages but none of it seem to be simple/flexible/powerful enough to help fulfill the modeling /sketching tasks I'm trying to achieve
Visio,
smartdraw
Edraw
conceptdraw
Vue
yEd
Dia
Kivio
paint.net
photoshop
Illustrator
GIMP
in addition I've played around with modeling tools including staruml,argouml and Visual Paradigm as well as Eclipse modeling, but most of them were too complicated, too constricting and in some ways completely alien. On a side note, I absolutely HATE eclipse, I'm used to writing shellscripts with nano on a shell, The sheer amount of features (That i will never ever have any use for) make it hard for me to find that which I'm really looking for. YAGNI GDDMM*T!
Allthough UML modeling is at times important, such models are more for the next follow up phase and would be overkill (as well as a creativity killing burden) when I'm trying to come up with something from scratch.
Right now I'm looking for something new, I would be more than happy if someone could perhaps suggest something,
Most importantly i would like to find a program where the software allows me to do add new shapes and with the parent shape automatically growing so that that added shapes all fit inside of it rather than that i have to manually resize the parent shape
Your problem is a common one, and in recent years the big UML tool vendors have started adding functionality for sketching, as opposed to traditional modelling. My favourite, Enterprise Architect from Sparx Systems, has got "whiteboard" sketching and is also able to import from Visio.
It boils down to whether you know you'll just want to sketch, in which case you should get a tool which does that really really well (that last feature you mentioned is something I haven't seen in any UML tool). If on the other hand you know that you'll eventually want to turn the sketches into UML models, you need to consider whether you'll want to start over (which might be the easiest option, honestly) or have some sort of in-tool support to do that.
For "UML as a Sketch" I use the Hruby UML Stencil for Visio. These do not enforce eny semantics, so you can be as sketchy as you need to quickly record ideas and communicate.
See http://www.softwarestencils.com/uml/index.html
I use Dia. It is cross platform. Very simple tool.
However, My favorite has always been to sketch it on paper and scan (fotopragh it on my mobile) and keep it for records. Nothing beats pen and paper yet !
I tried yEd recently, because I happened to see it mentioned in another thread here. I'm quite impressed with it. Its pretty easy to use. I think the feature I liked the most is that I can draw my diagram regardless of the spacing and orientation. Then 1 button and poof, the whole things rearranges into the ordering I want.
As a linux diagramming tool, im pretty impressed with it.
this one is good for remote team members.
Nothing to install
http://www.dabbleboard.com/
I've used Visio for so long IMHO nothing beats it.
That said, I rarely use Visio in meetings to take initial notes. We'll diagram on whiteboards (get someone else to do the diagramming while you "facilitate") and then I take pictures of the result. Transcribing the photos to a Visio diagram helps me think it through.

High-level programming language for music composition [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I would like to write an interactive song. It would contain state and logic. A listener/user should be able to modify some state vars using a GUI or a MIDI interface. Listener accessible vars don't have to directly represent tempo, pitch or any other music property. They would rather represent values that logic would process in order to make changes to the song.
Do I have to write such platform myself or something fitting my imagination already exists?
Look at cSounds and PureData.
If you are happy to use Java, check out JFugue.
I have tried PureData, CSound and SuperCollider.
CSound is very cumbersome to program in, and has had severe stability issues for my requirements (24bit/96kHz realtime low latency linux) in version 4.
PureData is graphical, which makes it even harder to keep code neat and tidy then with text files. Composing is a pain because you have to build your own composition GUI, which can be powerful, but as long as I'm my only user I find it's just faster to use text.
The winner hands down is SuperCollider, because it is a smalltalk inspired object oriented language which is quite pleasant to work with. It is split into an OSC controlled sound server, and the client language. I can recommend the sound synthesis server and using the language to create instruments without reservation for its excellent stability, great flexibility and incredible power. I've used it live on stage and the performance is incredibly good.
The score creation language suffers from many-hands syndrome; in lack of recent clear leadership there are too many ways to do too many things with too many limitations, but it is still better than CSound because at least you can use reasonable high level structures.
Still looking for a composition language that just gets it right.
Have a look at Strasheela:
It's a composition system based on the programming language Oz. Learning Oz isn't easy, as it it combines the functional and the logic programming paradigm. However if you liked the SICP book, then you will probably like it too.
Strasheela treats music composition as a Constraint Statisfaction Problem (CSP), and seeks "solutions" for it. It means that the music style is defined as mathematical constraints on integer numbers (finite domain), that must be statisfied, and the built-in constraint solving system computes the solutions "automatically".
P.S.: I cannot program in Oz, but I'm on my way of learning it.
See High level languages for Computer Music and Programming Languages used for music for help.
I am not sure if it covers what you are after for, but have a look at Java Sound API. For a FAQ about what it can do see here. The benefits are that is already bundled in the SDK and JRE and that is cross platform. Also, you could build the GUI using any Java toolkit.
If it weren't for the interactive bits, I'd suggest looking at Haskore or Nyquist, both effectively being DSLs for music generation.
Definitely take a look at Alex McLean's livecoding demos, though. It's more flexible and interactive as you can possibly imagine, using SuperCollider through OpenSoundControl.
Answer is for .NET:
I found something, checkout NAudio by Mark Heath, a great .NET music library I would say it should be contained in the BCL.
midi-dot-net is another great C# project by Tom Lokovic.
For music interaction, PureData, Max/MSP and OpenMusic (these two last are from IRCAM) are the best. PureData is freeware. Google them!
I don't really get what you want to do, but here is a list of some CL music software, both for composition and cognition: http://www.cliki.net/Music
You're looking for an Audio Programming Language. Another option you should consider is Processing - used by many artists and musicians for this type of work.
-Adam
Its a shame that none said about Chuck................
Chuck is a programming language that is specifically built for music/audio generation and composition.
You can download Chuck at http://chuck.stanford.edu
its a lot easier to use,and is a lot familiar to c,c++,java etc,however its easier to learn too.You can find at Coursera about chuck for free from California arts university,link here.

Resources