tag:blogger.com,1999:blog-6737713102444501259.post208182422568533047..comments2023-11-02T21:59:18.942-07:00Comments on KO7M - Ham Radio Blog: Arduino Due - USB keyboard with PSK31 encoderJeff ko7mhttp://www.blogger.com/profile/17258789919264407403noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-6737713102444501259.post-45820940672307036752018-01-16T20:04:13.095-08:002018-01-16T20:04:13.095-08:00Hello Jabi,
Thank you kindly for your comments. ...Hello Jabi,<br /><br />Thank you kindly for your comments. It is very possible to send GPS telemetry data as GPS uses NMEA textual sentences in general. For example, the following is an example GPS message (sentence): <br /><br />$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A<br /><br />This could be accomplished in many ways. One example would be to add support for the sentence to be sent when a function key is pressed on the keyboard.<br /><br /> case 63: // F6<br /> szText = "$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A";<br /> break;<br /><br />If these lines are added near the bottom of the code with the other function keys, this sentence could be sent.<br /><br />I suspect you are really wanting to understand how to interface a GPS into the code directly where the data sent by the GPS is encoded as PSK31 by this code. I am not prepared to produce a working example for you, but the general flow would be to read and enqueue the GPS data for transmission and the dequeue it for encoding as PSK31. <br /><br />As a general statement, the encoder takes a circular buffer called rgchBuf. This is a 256 byte buffer and you would write to it using the variable "tail" as the index of the next character that should be written. The code will empty the queue reading from the index using the variable "head".<br /><br />Add to the tail, remove from the head. When tail==head, the queue is empty.<br /><br />I trust that will give you sufficient information to proceed on your own. My best to you and do let me know how you get on modifying this code to suit your needs.<br /><br />73's de Jeff - ko7mJeff ko7mhttps://www.blogger.com/profile/17258789919264407403noreply@blogger.comtag:blogger.com,1999:blog-6737713102444501259.post-81083086392165468282018-01-16T09:24:34.250-08:002018-01-16T09:24:34.250-08:00Dear Jeff:
Congratulations fpr your work with the ...Dear Jeff:<br />Congratulations fpr your work with the Arduino and the Psk31. I have one qestion: how is possble send one telemetry data, GPS signal, for example with your code? What line I have to modify?<br />73,s de jabi, ea2aru.Anonymoushttps://www.blogger.com/profile/16452638853491880397noreply@blogger.comtag:blogger.com,1999:blog-6737713102444501259.post-69158684634962535162016-09-26T22:00:46.575-07:002016-09-26T22:00:46.575-07:00This article is only describing an encoder for BPS...This article is only describing an encoder for BPSK. The task of decoding these signals is not quite as simple as encoding them. Nevertheless, I will be doing a series of articles on various signal processing topics so you may find these of interest. I cannot promise at this time when I will publish them as my work schedule keeps me quite busy of late, so I have not had time to complete them. Hopefully soon!Jeff ko7mhttps://www.blogger.com/profile/17258789919264407403noreply@blogger.comtag:blogger.com,1999:blog-6737713102444501259.post-62285837004718302312016-09-19T10:49:09.504-07:002016-09-19T10:49:09.504-07:00this can be made also for decoder of bpsk31 ?this can be made also for decoder of bpsk31 ?yo2ldkhttps://www.blogger.com/profile/13224185082538360871noreply@blogger.comtag:blogger.com,1999:blog-6737713102444501259.post-23311107256533977832016-05-28T19:20:47.372-07:002016-05-28T19:20:47.372-07:00Another possible USB host shield you may want to l...Another possible USB host shield you may want to look at may be found at https://www.circuitsathome.com/products-page/arduino-shields.Jeff ko7mhttps://www.blogger.com/profile/17258789919264407403noreply@blogger.comtag:blogger.com,1999:blog-6737713102444501259.post-46990996032977602522016-05-28T18:44:07.671-07:002016-05-28T18:44:07.671-07:00The challenge here is that is is not a simple matt...The challenge here is that is is not a simple matter of using a different sketch. You also need the supporting hardware and firmware. There is also some confusion around the difference between using the Arduino as a HID device as opposed to accepting input from a HID device. For example, an Arduino R3 has a second AVR chip that is a USB device that provides the USB to serial functionality used to program the Uno R3. By changing the firmware on this second AVR chip, you can create sketches that will emulate a USB keyboard or mouse. Basically, the Arduino Uno looks like a keyboard to an external PC or Mac. This is a different matter than being the host for a USB keyboard or mouse where the Arduino is accepting input from a USB keyboard.<br /><br />Short of having a USB shield (such as the example shown here at https://www.arduino.cc/en/Main/ArduinoUSBHostShield) or using one of the newer Arduino devices such as the Arduino Due that includes USB hardware and firmware support, my suggestion is to use a PS2 keyboard with the Arduino Uno. There is a link in my posting above to an example implementation. Thank you kindly for your interest in my work.Jeff ko7mhttps://www.blogger.com/profile/17258789919264407403noreply@blogger.comtag:blogger.com,1999:blog-6737713102444501259.post-91799990637309090882016-05-26T06:44:04.952-07:002016-05-26T06:44:04.952-07:00Hi, ide like to use adruino uno r3 is it possible...Hi, ide like to use adruino uno r3 is it possible, have anybody change the sketch for it.<br />My email is dl1esz@gmx.dedl1eszhttps://www.blogger.com/profile/11369412277939517970noreply@blogger.comtag:blogger.com,1999:blog-6737713102444501259.post-59239876285052204802016-05-19T20:57:05.760-07:002016-05-19T20:57:05.760-07:00You mentioned: "There is a small start-up del...You mentioned: "There is a small start-up delay (of a couple seconds) on the USB host functionality, so if you power on the Due and start typing immediately, there may be some keystrokes that are lost. I have not investigated yet why this occurs in the standard USB library."<br /><br />I have not used the Due specifically, but the startup delay may be related to the serial bootloader mechanism that allows the Arduino IDE to gain control of the processor for loading new code to the Arduino. <br /><br />While working on the Arduino Nano there were a few changes available to modify the default startup behavior. One was to add a low resistance pullup (~120 ohms) to the USB handshaking line that was connected to the processor's RESET line. Another alternative was to remove the capacitor that formed the RC circuit that was also part of the USB to RESET circuit. Either way, this would prevent the USB port (and thus the IDE) from resetting the controller remotely. To load new software, you would have to start the IDE firmware upload and simultaneously reset the processor manually. The boot loader would then sync to the IDE and upload as expected. I used the pullup method with a toggle switch so I could enable/disable the reset line at the cost of a bit more power drain. (>120 ohms and the reset like would still assert; <120 ohms and the resistor would draw excessive current and heat up.) Removing the surface mount capacitor would not use extra power, but it could not be easily replaced or overridden for future development under IDE control. The primary point for me was to prevent someone from easily reprogramming the processor in the field using their own Arduino IDE, but they could still monitor and interact with the serial interface under normal program operation. But I still had a startup delay every time because the bootloader was checking to see of the IDE wanted to talk to it.<br /><br />http://playground.arduino.cc/Main/DisablingAutoResetOnSerialConnection<br /><br />The second alternative was to eliminate the bootloader firmware altogether, and program the part directly with an In Circuit Programmer. This would not only free up a bit of space for more user code, but it also eliminates the initial startup delay entirely. But you would then need extra hardware to program your device.Anonymoushttps://www.blogger.com/profile/01156725808239072958noreply@blogger.comtag:blogger.com,1999:blog-6737713102444501259.post-20891095296714582822016-03-10T21:18:00.584-08:002016-03-10T21:18:00.584-08:00Hello Jan. I am pleased that you have found my doo...Hello Jan. I am pleased that you have found my doodling in code useful.<br /><br />At the time that I wrote this code a year ago, the experimental USBHost library was distributed with the Arduino IDE. While it is still available, it is not installed by default. You can install it easily from the Sketch -> Include Library -> Manage Libraries menu. Open up the library manager from those menu selections and search for USBHost and just click Install.<br /><br />Also, the newer IDE requires you to install support for the Due separately from the "Boards Manager" menu in the IDE. This is found in the Cortex-M3 package. It will show the Arduino Due in the list of supported boards. Just click install.<br /><br />Once these steps were performed, I was able to build the code above. I copy/pasted it into the IDE and hit compile. I see that my string constants are being flagged as deprecated by the newer compilers. You will see warning messages such as this:<br /><br />C:\Users\Jeff\Documents\Arduino\PSK31Keyboard\PSK31Keyboard.ino:386:14: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]<br /><br />szText = "\nCQ CQ CQ de ko7m ko7m ko7m"<br /><br />Fair enough... :) It seems that string constants are now being flagged if you don't tag them as constants. These warnings can be eliminated by changing one line in the keyReleased() function.<br /><br />const char *szText = &rgchTemp[0];<br /><br />Just add the "const" specification on the front of the line. I will edit the code above to include this change and make a note of the need to install the USBHost library.<br /><br />Thanks for the feedback!<br /><br />73's de Jeff - ko7mJeff ko7mhttps://www.blogger.com/profile/17258789919264407403noreply@blogger.comtag:blogger.com,1999:blog-6737713102444501259.post-6548580998909824632016-02-27T07:11:21.056-08:002016-02-27T07:11:21.056-08:00This is really great work! Thanks for sharing.This is really great work! Thanks for sharing.Anonymoushttps://www.blogger.com/profile/15262382660049875379noreply@blogger.comtag:blogger.com,1999:blog-6737713102444501259.post-66334871790072663542016-02-05T13:47:04.046-08:002016-02-05T13:47:04.046-08:00Hello Jeff, thanks for all your amazing programmin...Hello Jeff, thanks for all your amazing programming work you did for this PSK31-engine. I have the PSK31-engine working on my Arduini-UNO and MEGA. Now I like to make it work with my DUE. But I can't find the USB-host library with keyboard-controller. I want to make a PSK31-encoder for my FTDX3000, who can decode PSK31 and RTTY and CW. Thanks in advandge for your answer, and keep the good programming going. Hpe cuagn 73's Jan PA2JJBAnonymoushttps://www.blogger.com/profile/17486634575701672864noreply@blogger.com