The ultimate partner for the HP Prime G2 - The Arduino Leonardo.
|
05-18-2023, 11:17 AM
Post: #8
|
|||
|
|||
RE: The ultimate partner for the HP Prime G2 - The Arduino Leonardo.
(05-18-2023 08:50 AM)Mark Power Wrote: Excellent work! A few questions for you: The code for using the FT260 is very similar but not the same. The FT260 needs to communicate with a code first, to define the type of communication, then a byte mentioning the length of data. While I could instruct the Arduino to send those bytes, I kept the program as simple as possible and only sent one byte at a time with the direct connection to Arduino Leonardo - resulting in a smoother graph. Using the Leonardo allows RAW HID bytes to be sent, you can just send relevant data numbers, or you could add a send marker and length data if you want. The light sensor is just an LDR I had lying around, it is a resistor whose value is changed when light hits it. The reason that the potentiometer is there is to 'tune' the LDR to range the voltage it outputs somewhere between 0v and 5v so that the full range of light my torch can supply, covers the full range of the graph, it along with the LDR are acting as a voltage divider. I certainly will post the code. I'm at work now, and will post it this evening. The Leonardo has to have a program on it to run which needs the Arduino-HID Project library to become a recognisable HID device, just include that in the Arduino Program, and a few lines from the RAW-HID example depending on if you want to get data into the calculator or send data out of the calculator. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)