Forum Replies Created
-
AuthorPosts
-
Tcm0ParticipantI’m not sure that “LcdConsole.WriteLine(BitConverter.ToString(pcf.ReadReg(2, 1)));” works.
Try it with “LcdConsole.WriteLine(Convert.ToString(pcf.ReadReg(2, 1)));
Tcm0ParticipantYou can try to use “0x70” as the register.
Tcm0ParticipantThe PCF8574AP must have registers because otherwise no I2C device can work with it. But the registers are programmed in the software.
Tcm0ParticipantYou probably don’t need the resistors on the breadboard. Can you read registers?
Tcm0ParticipantIt should work. Just create another brick with another name.
var brick1 = new Brick<Sensor,Sensor,Sensor,Sensor>(“wifi”);
var brick2 = new Brick<Sensor,Sensor,Sensor,Sensor>(“wifi”);
Tcm0ParticipantI havn’t tested it but you may be able to use the debugging console of Xamarin. Just google it.
Tcm0ParticipantYou use the button event and a loop. But that doesn’t work: You either have to use the button event or the loop.
Here is a quick example on how to use buttons without event:
`Buttons.ButtonStates TastenStatus = new Buttons.ButtonStates ();
Buttons.Instance.LedPattern (1);
do {
TastenStatus = Buttons.Instance.GetKeypress();
if (TastenStatus == Buttons.ButtonStates.Enter) { LcdConsole.WriteLine(“Enter is pressed.”); }
else LcdConsole.WriteLine(Convert.ToString(TastenStatus) + ” is pressed.”);
} while (TastenStatus != Buttons.ButtonStates.Escape);
Tcm0ParticipantSorry, but I havn’t used PID so far :/ http://www.inpharmix.com/jps/PID_Controller_For_Lego_Mindstorms_Robots.html gives a good introduction. There are also calculators avaible to calculate the PID. But maybe you’d better google before asking me as I don’t know so much about PID.
Tcm0ParticipantAs I said, PID is probably your best guess or at least the most acurate.
It seems that you use the NXT color sensor and not the EV3 one. In that case the first link from the other topic to the RGB mode would be right (:P to Anders).
Tcm0ParticipantFirst I updated the template for the new MonoBrick release: http://www.mediafire.com/download/2w8q8xq55y7gsdn/EV3TemeplateV2.1.zip.
It’s finished.
0. Make sure to have Visual Studio 2013 installed.
1. Unzip the latest version of the EV3 Template.
2. Make sure to save a backup somewhere as you need it for every new project.
3. Extract the EV3Temeplate folder from within the archive to the place you want to have your project.
4. Rename the folder as you like.
5. Go into [Your Name]\EV3Temeplate and open the config.cfg.
6. You can enter the IP of the EV3 under “IP:” and the name you want the final file to have on the EV3 under “Name:”. It’s Temeplate.exe by default. You will be requested every time you try to debug the application if you don’t enter anyting.
7. Open the “EV3Temeplate.sln” and edit the code as you wish.
8. Press “F5” or the small green arrow to compile and upload the application. Make sure that your anti virus scanner doesn’t delete the EV3Upload.exe in this step!
9. Start the application from within the EV3’s menu.You can find the most important parts in the Readme.txt in the archive, too.
- This reply was modified 10 years, 3 months ago by Tcm0.
Tcm0ParticipantSorry, didn’t know that the NXT had RGB mode. In that case the reflected light or the RGB mode (if it’s avaible for the EV3 color sensor) should be your choice.
Tcm0ParticipantYou can either go with the “GetTachoCount” function (http://www.monobrick.dk/MonoBrickFirmwareDocumentation/class_mono_brick_firmware_1_1_movement_1_1_motor.html) or with the PID class (http://www.monobrick.dk/MonoBrickFirmwareDocumentation/class_mono_brick_firmware_1_1_movement_1_1_position_p_i_d.html). You can find more about PID at wikipedia: http://en.wikipedia.org/wiki/PID_controller.
Tcm0ParticipantYou can try to go by reflected light or the RGB mode (http://www.monobrick.dk/MonoBrickFirmwareDocumentation/class_mono_brick_firmware_1_1_sensors_1_1_r_g_b_color.html).
Tcm0ParticipantYou only have to write the new image to the microsd using the win32 disk image. But you will use all files and settings you previously made.
MonoBrick is running on .NET. Wouldn’t it be easier to make a simple Server-Client communication with the server running on your computer. Just google “.net server client communication” or “c# server client communication”.
Tcm0ParticipantSounds like the program is throwing an exception. Can you please post the code you wrote?
-
AuthorPosts
Follow