Forum Replies Created
-
AuthorPosts
-
Tcm0ParticipantThe DLL on that page will probably usually be the latest one. In addition to that, there will probably a forum entry when a new DLL comes out.
The firmware checks automatically for updates on boot. I think that there will be a new DLL when there is a new firmware for the EV3.
Tcm0ParticipantBut that’s no reason why Zoltan shouldn’t test it. Maybe he’s a bit experienced, too and has no problems with the Visual Studio. Maybe he just wants to compile the code which is really not hard in VS (just press F5).
Beeing an Admin means nothing. I’m a Moderator in a forum about a product that I don’t even own. And the Forum has good stats, too. I don’t even visit it often any more.
Tcm0ParticipantZoltan, the best for you would be to download the visual studio and try it yourself. You can continue to use it of you are confident with it or try to install xamarin studio if you don’t like it. I really like the visual studio as IDE (and Xamarin, too) but Helmut doesn’t.
Tcm0ParticipantTo Zoltan Szilagyi:
You can program the EV3 with the original Visual Studio by Microsoft, too. But only the 2010 version works on XP.
Tcm0ParticipantbricxCC only supports the EV3 for it’s tools (like port view). You can’t program it with BCC.
You might want to look at this template if you use the visual studio from Microsoft to program. It uploads the files directly to your EV3.
I have a german guide on how to install MonoBrick, but it probably won’t help you much. Do you have seen this guide?
Tcm0ParticipantCould you please post your sourcecode?
Do you have copied the *.dll to the brick, too?
Do other files work?
Tcm0ParticipantWhy don’t you port your NXT code to EV3? 😛
Tcm0ParticipantNevermind, I got it: Klick me.
Here is my wiring diagram (yes, my breadboard is a mess): Klick me.
And now the code.
My Arduino class:using System; using MonoBrickFirmware; using MonoBrickFirmware.Sensors; namespace EV3Temeplate { class Arduino : I2CSensor { public Arduino(SensorPort Port, byte adress) : base (Port, adress, I2CMode.LowSpeed) { base.Initialise(); } public byte[] ReadReg(byte Register, byte Length) { return base.ReadRegister(Register, Length); } public void WriteReg(byte Register, byte[] Data) { base.WriteRegister(Register, Data); } public byte[] ReadAndWriteReg(byte Register, byte[] Data, int rxLength) { return base.WriteAndRead(Register, Data, rxLength); } public override string ReadAsString() { throw new NotImplementedException(); } } }
My program.cs:
using System; using System.Threading; using MonoBrickFirmware; using MonoBrickFirmware.Display; using MonoBrickFirmware.Sensors; using MonoBrickFirmware.UserInput; namespace EV3Temeplate { class Program { static void Main(string[] args) { EventWaitHandle stopped = new ManualResetEvent(false); LcdConsole.WriteLine("Connecting..."); byte Adresse = 0x04 << 1; ButtonEvents buts = new ButtonEvents(); Arduino Arduino1 = new Arduino(SensorPort.In1, Adresse); byte[] Ergebnis = new byte[1]; LcdConsole.WriteLine("Connected"); LcdConsole.WriteLine("Press Enter to read I2C Port"); LcdConsole.WriteLine("Press Escape to leave program"); buts.EscapePressed += () => { stopped.Set(); }; buts.EnterPressed += () => { Ergebnis = Arduino1.ReadReg(0x04, 1); LcdConsole.WriteLine("Result: " + Convert.ToString(Ergebnis[0])); }; stopped.WaitOne(); } } }
and the program that runs on the Arduino (sorry, I can’t organize it): Klick me.
Tcm0ParticipantDoes anyone have a working example for any I2C sensor (maybe an official one)? It would be helpfull when trying to write something for the Arduino.
Tcm0ParticipantI think that MonoBrick only can show *.bmp files yet: General Description and example.
Tcm0ParticipantOkay, I thought that you wanted to upload a program during running another program.
You can test the “general” file access options of visual studio. They might work.
Tcm0ParticipantWhy do you want to do that?
Tcm0ParticipantDo you have included the MonoBrick DLL? Which line has the error?
Tcm0ParticipantDebugging with the normal Visual Studio Debugger seems not to work because the EV3 would have to run the “msvsmon.exe” from “Microsoft Visual Studio 12.0\Common7\IDE\Remote Debugger\x86”. I don’t think that it’s compatible with the Mono/ Xamarin debugger.
Maybe the debugger of Xamarin can be used alone/ the VS plugin of Xamarin can be used but I’m still testing that. -
AuthorPosts
Follow