upload C# or Java Code to Arduino

Can somebody help about this subject

i wrote application in C# like tetris game or blink led ets. Now how can i upload that code to arduino?
Does somebody has any idea?

smeker:
Can somebody help about this subject

i wrote application in C# like tetris game or blink led ets. Now how can i upload that code to arduino?
Does somebody has any idea?

Yes, you'll need a hardware upgrade of the Arduino to something else with same power connector, which will run your software.

Or put it another way: Sorry son, the world doesn't work the way you imagine it does.

Korman

Take a look at Netduino. It runs on the .Net Micro framework.

Yes, you'll need a hardware upgrade of the Arduino to something else with same power connector, which will run your software.

That would be a NetDuino.

See the current application as the design (a prototype version). You now understand the logic how it can/should work. Step to make is to translate that design to the C++ Arduino language and compile and upload ... Not trivial, but you allready have a design/proof of concept.

Serious point of attention is if the arduino is capable enough (limited resources!) to do all the things you imagined in C#/Java ...

On limited resource part, here is how limited:

2K SRAM for variables and function calls
32K (including boot loader) FLASH to store program binary
1K EEPROM for non-volatile storage between power on/off

If you know how to program in C/C++, this gives you lots of space for things to do. Think procedure-oriented programming and limited use of OOP and dynamic memory allocation. I used Java and Processing (based on Java) and they're not optimized for tight quarters. I don't know about C#. Is it C or else?

I don't know about C#. Is it C or else?

C# is best compared to Java (in terms of complexity, language constructs etc)

robtillaart:

I don't know about C#. Is it C or else?

C# is best compared to Java (in terms of complexity, language constructs etc)

So more or less with everything wrapped in classes and a main class gets instantiated and runs all preparation and "see-ya". Entirely event-driven after that?

robtillaart:
C# is best compared to Java

IE: it also requires an outrageously prodigious amount of memory.

So the OP will need to brush up on procedural programming.

liudr:
So the OP will need to brush up on procedural programming.

Not really. The original poster will need to get some basic clues first. Alone the illusion that programs written for the PC will cross-compile shows that he lacks the most basic undertanding about micro-controller, their uses and limitations. And this will prove the be the major problem for him, not to learn yet another programming language.

My advice for the original poster is to learn about the Arduino - or any other micro-controller - as a new environment with its own language. The comfort of the little programming knowledge he has will hinder him instead of making things easier. Too many things simply don't work the same way even if they look alike and have the same name.

Korman

Korman:

liudr:
So the OP will need to brush up on procedural programming.

Not really. The original poster will need to get some basic clues first. Alone the illusion that programs written for the PC will cross-compile shows that he lacks the most basic undertanding about micro-controller, their uses and limitations. And this will prove the be the major problem for him, not to learn yet another programming language.

My advice for the original poster is to learn about the Arduino - or any other micro-controller - as a new environment with its own language. The comfort of the little programming knowledge he has will hinder him instead of making things easier. Too many things simply don't work the same way even if they look alike and have the same name.

Korman

I was going to suggest something like printing out squares over serial monitor, just like first couple chapters of C programming.