SerialCheck(fpioctl(FHandle, TCIOflush, anycodings_arduino Pointer(PtrInt(TCIOFLUSH)))) Ĭomment out lines 2201, 22 in anycodings_arduino the same. Thanks had to change the 'synaser.pas' file anycodings_arduino in the following way to get it to work. I am using a Mac and this error seems to be anycodings_freepascal related to a windows system? SerialCheck(fpioctl(FHandle, TCFLSH, Pointer(PtrInt(TCIOFLUSH)))) Here's the part of the synaser.pas file anycodings_freepascal referred to: Ser.SendString('on') // button 2 should have 'off' hereĪn error message appears in the synaser.pas anycodings_freepascal file:Įrror incompatible types: got "ShortInt" anycodings_freepascal expected "Pointer". Ser.Connect('my-com-port') // write here Arduino COM port number (on linux it's something like '/dev/ttyUSB0') I am anycodings_freepascal trying to read these strings using anycodings_freepascal FreePascal so that I can plot the values.įollowing instructions here I have anycodings_freepascal downloaded and used the Synapse library in anycodings_freepascal the following way:Ģ) In anycodings_freepascal Lazarus goto 'Project' -> 'Project anycodings_freepascal Inspector' -> 'Add Files from File anycodings_freepascal System' -> select 'synaser.pas'.ģ) Add anycodings_freepascal the following code to the form button event: procedure TForm1.Button1Click(Sender: TObject) #Synapse library for free pascal serialThe Arduino is programmed using the Arduino anycodings_freepascal IDE and sends random numbers (between 0 and anycodings_freepascal 255) as a string to the serial port. I have anycodings_freepascal downloaded the Synapse library for anycodings_freepascal FreePascal (Lazarus v.2.0.8) from here but I anycodings_freepascal run into an error. I'm trying to read serial data from an anycodings_freepascal Arduino to my Mac (10.12.6).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |