Cannot use Arduino

Solved
Belabidou Posted messages 29 Registration date   Status Member Last intervention   -  
georges97 Posted messages 14566 Registration date   Status Contributor Last intervention   -
Hello,

For my final project, I need to control motors by programming on Arduino, so I wanted to download the software onto my computer to work at home.

The software installs, I wrote my code, but when I plug in the Arduino board (uno), I can't select a port: the box is greyed out.
Therefore, the code won’t upload.

The only thing I found online is that it must be a driver issue. Indeed, when I plug in the board, the computer tells me that the device is unknown. When I try to update the drivers, it either tells me that the best driver is already installed or that the .inf file is not suitable for a 64-bit operating system.

I also tried changing cables, ports, restarting etc... nothing works. I tried on 3 computers: the driver won't install on any of the 3 computers! (all 3 are 64-bit)

I really need help because I'm already behind, and I would like to make the most of the holidays to work hard on my project…

Thank you

7 answers

  1. georges97 Posted messages 14566 Registration date   Status Contributor Last intervention   2 919
     
    Hello,

    I am also on 64-bit and had the opportunity to connect an mbot robot (mblock IDE compatible with Arduino) without any problems.

    Are you sure about your source for the IDE being used? Try reloading it from the official site arduino.cc

    Beforehand, I would uninstall Arduino using Revo Uninstaller to ensure that all traces of the current installation, including drivers, are removed.

    Additionally, some Chinese copies have driver issues (in which case you need to download it from the manufacturer's site)

    If you can borrow an Arduino from another manufacturer, it would eliminate the hypothesis.

    You should also assume that the firmware of your board is not corrupted. To check, connect it at a colleague's place where the IDE works.

    Best regards
    0
    1. Belabidou Posted messages 29 Registration date   Status Member Last intervention   3
       
      Hello, thank you for your reply.

      I downloaded the IDE from the official Arduino website on all three computers, and since I changed computers, it's the same as uninstalling with Revo.
      Before the holidays, the board worked perfectly on the school's computers, so I don't think it's related to the firmware :/

      When you first used Arduino, did you have any driver issues, or did it work right away?
      I would also like to know which version of your IDE you have, as it might also be a software issue with the latest updates.
      0
  2. georges97 Posted messages 14566 Registration date   Status Contributor Last intervention   2 919
     
    Indeed, by changing computers, you can avoid issues with old installations.

    I have never had driver problems at all, whether on desktops or laptops. With the mBlock IDE (but to my knowledge, the same goes for Arduino, the driver is integrated).

    I doubt that the latest versions of the IDE are the cause of the problem; revisions tend to resolve them. I have version 1.8.10 but have never used it on a board. I currently use it to open and study or test scripts.

    You didn't mention the brand of this board. Can you try another one?
    0
    1. Belabidou Posted messages 29 Registration date   Status Member Last intervention   3
       
      It's an Arduino Uno board bought from Gotronic
      It works perfectly on the school's computers, it's really strange
      I'll try with mBlock (if it's compatible with Arduino boards)
      The thing is, I won't be able to try other boards before school starts and I wanted to work on the project during the holidays :/
      0
  3. georges97 Posted messages 14566 Registration date   Status Contributor Last intervention   2 919
     
    Mblock is compatible with Arduino. Gotronic is reliable and their boards are certainly compliant. You probably have a friend or relative who would let you test it on their PC.

    Mblock is a graphical block environment derived from Scratch, which produces Arduino code. You can select this board instead of their boards.

    There is a version 3 and a version 5.

    The idea is not to make you change environments but to test the serial port and the uploading.

    Keep us updated.
    0
    1. Belabidou Posted messages 29 Registration date   Status Member Last intervention   3
       
      Thank you very much, I will try tomorrow and keep you posted.
      Is it possible to transfer Arduino code to Mblock?
      0
  4. georges97 Posted messages 14566 Registration date   Status Contributor Last intervention   2 919
     
    It's not possible for the following reason:

    Mblock, like about a dozen of IDEs derived from Scratch (Ardublock, Snap, S4A, etc.), generates Arduino code, a "hybrid" language based on C plus C++ libraries and procedures from a language called Processing. This Arduino code is available as scripts in .ino format.

    To my knowledge, there is no way to convert these scripts for any of these environments.

    However, when you create an mblock script using graphical blocks, it generates an Arduino script that you can use in the Arduino IDE as needed by disabling a few lines and adapting some commands, particularly for motors.

    You will probably also need to change the file extension from .sb2 to .ino for this.

    You can open the Arduino IDE from Mblock3.

    I advise you not to start by trying to transcribe your Arduino scripts into mblock. First, check that Mblock works properly by uploading, even with a single-line script, then write simple programs in mblock to familiarize yourself with the environment. Then gradually transcribe your project into graphical blocks, and retrieve the output in Arduino code that you can test when you return to class.

    Looking forward to hearing from you.
    0
    1. Belabidou Posted messages 29 Registration date   Status Member Last intervention   3
       
      Thank you very much! I will try tomorrow.
      0
  5. georges97 Posted messages 14566 Registration date   Status Contributor Last intervention   2 919
     
    Hello,

    My night research:

    Before you dive into Mblock, I suggest exploring these solutions, which advocate for a manual uninstall-reinstall of the driver. One of these procedures should resolve the issue.

    https://openclassrooms.com/forum/sujet/port-serie-grise
    https://forum.arduino.cc/index.php?topic=143599.0
    https://forum.pobot.org/topic275.html
    https://forums.futura-sciences.com/electronique/583105-arduino-port-com-1-not-found.html
    https://progeko.wixsite.com/progeko/copie-de-le-permutateur
    https://forum.pcastuces.com/probleme_de_port_com1-f3s26587.htm

    Progeko's solution, easy to follow, seems to be the first one to test.

    Looking forward to hearing from you.
    0
    1. Belabidou Posted messages 29 Registration date   Status Member Last intervention   3
       
      Hello,

      Thank you very much once again.

      I tried each link, even retrying some because I had already looked for solutions online but nothing works for me.

      So I downloaded mBlock 3, selected Arduino mode, the Arduino Uno board, and Serial port com 3.

      The upload went smoothly on the first try without any issues.

      I will therefore try to transpose my code to control the motor and let you know if it works.
      0
    2. georges97 Posted messages 14566 Registration date   Status Contributor Last intervention   2 919 > Belabidou Posted messages 29 Registration date   Status Member Last intervention  
       
      Hello,
      I
      I'm glad to hear that. Don't forget that the port number can change with each connection. Generally, it's the last one on the list, but that's not always the case, and sometimes you have to go through the list before getting a connection.

      It may also happen that you have to restart the program, but fortunately that's rare.

      Try again with Arduino; it might now use the driver installed by mBlock, now that the board is recognized.

      I'm here if you need help. By the way, thank you for your thanks, as few people who receive help show gratitude, and most often disappear without a word, leaving us unsure if their problem was resolved. It's a matter of education in my opinion.

      Happy discovering.
      0
    3. Belabidou Posted messages 29 Registration date   Status Member Last intervention   3 > georges97 Posted messages 14566 Registration date   Status Contributor Last intervention  
       
      In fact, I was using my phone at the same time to read your responses, and I had it plugged into the computer to charge...
      But when I unplugged it, there was no more serial port even in mBlock!

      So the upload doesn't work either
      And I couldn't find how to convert from .ino to .sb2

      It really doesn't want to work, I will assume it's a hardware issue and I'll try with the computers at school, and on my computer with other boards.

      In the meantime, I will work with simulations, the main thing is to verify that my codes work as I want, then I will move on to the real thing with the school computers.

      Expressions of gratitude are normal and necessary, the time you are giving me is very useful, I am grateful to you.
      0
    4. georges97 Posted messages 14566 Registration date   Status Contributor Last intervention   2 919 > Belabidou Posted messages 29 Registration date   Status Member Last intervention  
       
      You haven't read my last post carefully.

      1) You say the download was successful. This is something you can't have made up since the message "Done" appears in the log window at the end of the download. Moreover, when you selected serial port 3, at the top of the mBlock window, the inscription "Déconnecter" (a translation error for "Disconnected") changes to "Connected". The mBlock board also makes a sound, and I think the same goes for the Arduino board.

      If you unplug the USB cable, the serial connection is interrupted, so it's normal for it not to appear anymore. You need to re-establish it every time you unplug the USB cable.

      It may also be that unplugging the phone changed the order of the USB ports?

      In any case, if it has worked once, there is no reason it shouldn't work again.

      So please redo the "connect/to serial port (com)" maneuver by looking for the available port (it could be 8 or 9).

      2) Furthermore, you just need to rename the .sb2 extension to .ino. Don’t forget that you will probably be asked to save the file in a folder with the same name (this happens automatically).

      You also have the option to launch the Arduino IDE from mBlock, which allows you to save a .ino file directly.

      To do this, when you have written a mBlock script and clicked on the "generate code" block (the hat), you have a button "open Arduino IDE" at the top right which will allow you to transfer the code to Arduino and thus save it as .ino.

      Do you have time this evening to try point 1)?
      0
    5. Belabidou Posted messages 29 Registration date   Status Member Last intervention   3 > georges97 Posted messages 14566 Registration date   Status Contributor Last intervention  
       
      I have redone point 1), but actually the card drivers don't want to install, so I can't select a port; in mblock it displays "no serial port"
      In fact, when it worked the first time, it recognized my phone on COM port 3.
      0
  6. georges97 Posted messages 14566 Registration date   Status Contributor Last intervention   2 919
     
    Hello,

    Your case is bothering me.

    That said, since you have this urgency, it's better that you don't stubbornly persist (like I do) on this unprecedented case and that you work on a simulator.

    That said, two things puzzle me.

    1) You did not indicate the OS you are using. Maybe you're on Windows (XP by chance) which requires the driver to be installed in compatibility mode.

    2) The smartphone episode leaves me perplexed. There is no reason for your PC to have installed the Arduino driver for the smartphone, as it cannot have associated it, due to not recognizing its firmware.

    The procedure for the drivers is to install the software (in this case Arduino or mBlock) and then connect the device (the Arduino board) afterwards, which will establish the pairing between the OS, the software, and the board.

    I would therefore suggest uninstalling the driver (through the device manager, right-click/properties, uninstall)

    Then uninstall/reinstall mBlock in compatibility mode if needed, with the board unplugged.

    Have a good day.
    0
    1. Belabidou Posted messages 29 Registration date   Status Member Last intervention   3
       
      Hello,

      Regarding the operating systems, I used two Windows 10 64-bit and one Windows 8 64-bit.

      I did what you told me (with a Windows 10):

      - I connected the board to uninstall the driver from the device manager. Then I disconnected the board.

      - I downloaded and installed Mblock, then I connected the board: same result, the computer does not recognize the board and there is nothing in "Serial Port."
      However, the board is powered as the sensor LED lights up and the motor exerts torque. (I also tried with the board alone, without anything connected to it)

      - Regarding the phone, I did a test: I only connected the phone to the computer and there was a "com 3" port, I was even able to upload without problems... I then tried again with the board, but there was nothing in Serial Port...
      0
      1. georges97 Posted messages 14566 Registration date   Status Contributor Last intervention   2 919 > Belabidou Posted messages 29 Registration date   Status Member Last intervention  
         
        Hello,

        Well, I won’t insist. It would waste your time in relation to your "holiday assignments". I am perplexed that this works at your establishment.

        If you could borrow a mobile phone, it would allow for yet another attempt. It's a shame that it doesn't work on your PCs. I haven't encountered similar cases on the fifteen PCs (at least five brands and different motherboards) in the robotics workshop that I run.

        It would be good if one of your classmates could lend you their card when school resumes.

        Looking forward to hearing from you and good luck with your work,
        Georges
        0
      2. Belabidou Posted messages 29 Registration date   Status Member Last intervention   3 > georges97 Posted messages 14566 Registration date   Status Contributor Last intervention  
         
        Yes, when school starts again, I will try with other cards on my computer, and I will try the current card on a workstation at the high school.
        I wouldn't be surprised if it's a hardware issue (to be honest, I hope so, because we don't see any other solutions and it's quite frustrating.)

        I will keep you informed.
        Have a good day.
        0