D21G COM port goes missing
Once I uploaded example "serial clock" from MCP7940.h library Ports in Tools->ports grayed out as there is no ports to select and error was shown "Couldn't find a Board on the selected port. Check that you have the correct port selected." After a lot of searching I found these steps to be able to select ports again
- Take the cover off and locate S1 ( the reset button) underneath the LCD.
- Connect your USB and power up the Industruino.
- Within 5 seconds, press S1 twice (double tap). The LCD should now "breathe" indefinitely.
- Now you should find the board in the Tools -> Port menu. Select it.
- Upload an empty sketch to the Industruino.
After doing that I uploaded my sketch and it said done uploading but it doesn't work (same sketch did work before trying to upload "serial clock") and when I click on serial monitor ports go gray again and I get error "Board at COMxy is not available"
I'm digging up this old post in the hope my info helps someone else in the future. I had the exact same problem and after nearly a day of seraching I found the solution.
You can't use the Indio library functions BEFORE you call setup(). I had some code that ran on an Arduino Mega that constructed an object before setup() and in that constructor, pinMode() was called. I had changed my mega code to suit the D21G and used Indio.digitalMode() inside that constructor and that's where the problem occured.
In regular arduinos, you're not supposed to use pinMode or digitalReads/Writes outside setup() and loop() either but in the code that I was running, it quietly kept on working on the mega without any obvious issue.
I made an account for this post. I hope it helps someone!
Hi, the library example will not work unmodified, you need to change a couple of things so it's better to start from our example https://github.com/Industruino/democode/blob/master/rtc_D21G/rtc_D21G.ino
Can you try this and let us know if that works for you.
The procedure you describe to reset the unit is correct, it is also included in our doc at https://github.com/Industruino/libraries
Hi, the main thing to note is that the USB serial is called 'SerialUSB'; if you try to print to 'Serial', which is connected to D0/D1 and the RS485, your sketch may get stuck
Hi Tom,
we tried exactly that example (https://github.com/Industruino/democode/blob/master/rtc_D21G/rtc_D21G.ino), but now are faceing problems that no other sketches work.
What was done:
1) sketch rtc_D21G.ino was uploaded
2) D21G bricked - USB connection to the PC was lost
3) followed restore procedure as described in later post
4) D21G was unbricked, looking good
5) completely different sketch was uploaded with no warnings, but when Serial Monitor in Arduino was activated, D21G bricked again (USB connection to the PC is lost)
This happens continuously now. Please advise.
Hi Marko, sorry to hear about that. Let's take a step back to make sure it is a hardware problem. Assuming that you have an INDIO unit, can you confirm that you are powering it with external 12/24V on V+/V-. Then upload the standard Blink sketch, changing LED_BUILTIN to 26 which is the LCD backlight. If that works fine, try the rtc_D21G.ino again, with the Serial Monitor. You are aware that the USB Serial port is called 'SerialUSB' right? Can you try another demo sketch that uses SerialUSB, e.g. https://github.com/Industruino/democode/blob/master/IndustruinoDemoCode_D21G/IndustruinoDemoCode_D21G.ino
Hi Marko, sorry to hear about that. Let's take a step back to make sure it is a hardware problem. Assuming that you have an INDIO unit, can you confirm that you are powering it with external 12/24V on V+/V-. Then upload the standard Blink sketch, changing LED_BUILTIN to 26 which is the LCD backlight. If that works fine, try the rtc_D21G.ino again, with the Serial Monitor. You are aware that the USB Serial port is called 'SerialUSB' right? Can you try another demo sketch that uses SerialUSB, e.g. https://github.com/Industruino/democode/blob/master/IndustruinoDemoCode_D21G/IndustruinoDemoCode_D21G.ino
--Tom
Sent by Industruino using Odoo
Your answer
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
Keep Informed
About This Forum
This community is for professionals and enthusiasts of our products and services.
Read GuidelinesQuestion tools
Stats
Asked: 5/30/18, 9:23 PM |
Seen: 4115 times |
Last updated: 10/14/22, 10:20 AM |
Hi, What makes the rtc_D21G.ino to work? I need to integrate the code into a much more complex software, but i always loose the comport... apreciate the help.Thanks Jonas