Forum Replies Created
-
AuthorPosts
-
Helmut WunderParticipantthank you! 🙂
Helmut WunderParticipant… just as happened here for the caption of this topic… 🙁
Helmut WunderParticipantthe same about the 2 GB imagefile:
! C:\Dokumente und Einstellungen\Helmut\Desktop\temp\imagefile_2GB.img.gz: Unerwartetes Archivende.
! C:\Dokumente und Einstellungen\Helmut\Desktop\temp\imagefile_2GB.img.gz: CRC-Fehler in imagefile_2GB.img. Die Datei ist fehlerhaft.BTW, what is the advantage having the 512kB or 2GB or 4GB image?
Helmut WunderParticipantthank you, now I understand!
uses
was known to me as a PASCAL statement which includes unit files and which worked similar like
#include
for (e.g., header) files in plain C
so I confused this C# command
using
by the aforementioned.the other issue now is resolved, too – it wouldn’t work because inside an init procedure the instance variables woud be just local and not global and thus useless for their intended purpose.
But now it’s clear, thanks again! 😎
Helmut WunderParticipantBerni,
thank you for your post!
In C# formatting appears to be far more complicated than when using C (“%3d”, “%5.2f”,…) so it will take some time until I will have learned that stuff. I’m curious if it once will be possible to simplify this issue by having inline functions (like wraps around the C# functions)…
Helmut WunderParticipanthaha, nice try 😀
but actually: no. I daresay that I did a lot of things at the limits of NXC, but I ever failed trying to do low-level things like i2c, BT, or rs485 protocols.
So i2c is actually not supposed to be an appropriate approach to learning C#…Other way round: having the transcoded NXC program from above to a C# source would make me deductively slowly step into understanding C# syntax rules 😎
Helmut WunderParticipantthanks for the LCD thing – now just the XG1300L gyro+acc i2c code is pending… 😉
Helmut WunderParticipantthank you, I already found this, but I don’t see information about this C-equivalent formatstring and multi-Variable-formatting. I guess C# is quite different from C, probably still a lot to learn anew…
Helmut WunderParticipantsry, can’t edit my post any more, I meant something like
printfxy(0,10,"GyroAngle: %4d", gyro.Angle() ); printfxy(0,20,"Acc XYZ:%4.2f%4.2f%4.2f", gyro.accX(), gyro.accY(), gyro.accZ() );
is this possible ?
Helmut WunderParticipantps
something likeprintfxy(pixelX, pixelY, "formatstring", value (,value) (,value) (...) )
would be fine to have, too, for screen output as a substitute for NXC NumOut and TextOut- This reply was modified 10 years, 7 months ago by Helmut Wunder.
Helmut WunderParticipantI’d really like to contribute and give some code input if I got help transcribing the NXC i2c commands into Mono i2c commands
ArrayBuild(); I2CStatus(); STAT_COMM_PENDING; I2CWrite();
and test the code and fix possible issues, and if the code once is finally fixed then it might – and should – be implemented. I’ll track and show the progress made by a youtube video.
IMO the XG1300L IMU is worth while to be supported because it provides a never-seen accuracy and extremely low noise level or drift for navigaton and dead-reckoning.- This reply was modified 10 years, 7 months ago by Helmut Wunder.
Helmut WunderParticipantAnders,
thank you for your reply, I’m really looking forward to the solution – hopefully it will be also suitable for really uneducated novice programmers 😉
Helmut WunderParticipant…and Lego calls it layers, not levels…
Helmut WunderParticipantsorry- in both cases: OutI or In9 for the 3rd brick == 2nd slave brick, of course
Helmut WunderParticipantHope this answers your questions….
ahaaam…. actually …, haha, …. no 😉
I don’t understand a single word about “network socket connection” or “RNDIS or CDC device”.
What I mean is to use it simply like with the Lego software –
just use either I/O of the chained bricks as if they were local.
Given, e.g.Motor motor = new Motor(MotorPort.OutA); // is for the 1st port of the master brick; alternatively: alias Out1 // then Motor motor = new Motor(MotorPort.OutI); // would be for the 1st port of the 3rd slave brick; alternatively: alias Out9
the same about the sensors:
var touchSensor = new TouchSensor(SensorPort.In1); // is for the 1st port of the master brick // then var touchSensor = new TouchSensor(SensorPort.In9); // would be for the 1st port of the 3rd slave brick
Alternatively you might implement “levels” for brick instances like the Lego fw does (and like your communication lib is supposed to do as far as I see through it) instead of numerating ports from 1 to 16 or whatever….
- This reply was modified 10 years, 7 months ago by Helmut Wunder.
- This reply was modified 10 years, 7 months ago by Helmut Wunder.
- This reply was modified 10 years, 7 months ago by Helmut Wunder.
-
AuthorPosts
Follow