Notifications
Clear all

ESP32 Setting up for And Problems with the pyserial

6 Posts
3 Users
2 Likes
2,387 Views
(@farzad_k)
Member
Joined: 3 years ago
Posts: 75
Topic starter  

Hello.

I am reading instructions on setting up ESP32 on my PC and I have looked at Adafruit instructions on installing it and I am having a lot of difficulties. I have also installed Python itself, and more and more it looks like programming the board might be the easiest part once one can understand what Python is and how it works. I have installed python but the instructions to setup .py doesn't work, and in fact command "sudo python setup.py install" which Adafruit claims is univeral once python is installed is not acceptable in Windows, and the command "python setup.py install" results in a python not found error message. I have also installed Python directly from MS store, but what happens when I execute the command "python setup.py install" is that I am told I don't have privileges in the folder it wants to install it at while I am in the command window as an administrator.

 

Anyone here has succeeded installing pyserial and cares to share their secret?

 

Thanks a lot.

 

Farzad

 

 

 

 

 

 


   
Quote
Topic Tags
 Arlo
(@arlo)
Member
Joined: 3 years ago
Posts: 24
 

Farzad,

    You might want to check out toptechboy.com, Paul has put together a tutorial on Python starting with the install  Here. 

Hope this helps.

Arlo


   
Farzad_k reacted
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1663
 

Hi Farzad,

   You are trying to go places I haven't explored by mixing a number of options together, so maybe others can help more. However, in case you don't get better advice, consider starting at a 'simpler' level.

@arlo 's suggestion is indeed a good place to start, as Paul (like Bill for this website) does a good job of taking everything from the beginning, a step at a time.

The first question I have of your intentions, relates to what part Python plays in relation to the ESP32. For most people, 'normal' Python requires a PC or similar class of processing capability, and there is a wealth of support for it living in a Linux or Windows environment. MicroPython is a port of the language that has been 'downsized' for ESP32 and other microcontroller systems, but it has much less support and experience. 

By contrast, for the ESP32, then the Arduino IDE, which is C++ based, also has massive support base.

Personally, if you starting at 'the bottom', and we are all there for some things and started there for others, I would be inclined to 'structure' your approach, by initially splitting into the well supported areas .... then when you get more comfortable, bring them together.

So start with:

  • ESP32 (and possibly other Arduinos, depending on the project of the day), using Arduino environment, programming in C++. You will need PC or similar, running Windows or Linux, to provide the programming environment, etc.
  • Python, on PC running Windows or Linux. Initially your programs are likely to be 'confined' to the PC.

In some cases, you may be able to use both in the same project ... i.e. the Arduino part interfaces to real hardware, etc, whilst the PC runs a Python program to provide screen, keyboard, etc.

Then, once you have become comfortable with both of these streams, try looking to something like MicroPython, to actually run Python on the ESP32.

It's a pretty long path, but maybe more rewarding in the long term.

-------------

Looking at your original experience, "sudo xxx...." implies a Linux, not Windows, environment.

I don't know what instructions you were following for the Python install, but Windows and Linux tend to present different 'gotchas', which can be real nightmare to a beginner. So I would advise starting with a tutorial series that you can follow a keypress at a time to get started ... and Arlo's suggestion is a sound one.

Good luck on your journey.


   
Farzad_k reacted
ReplyQuote
(@farzad_k)
Member
Joined: 3 years ago
Posts: 75
Topic starter  

@davee Thanks for the message.

 

I was actually following Bill' instructions and I knew this was going to be tough when he mentions Window's users might have "additional difficulties". He refers you to Adafruit and their instructions. Unfortunately their instructions are not accurate.

What I found out though is that version 3 of Python does not work well with Windows. So I installed version 2.x of python and serial port software (I forget the name of it) and the setup worked. I am now looking for the ESP32s that I can use on a breadboard so that I can begin having fun with it.

 

Farzad


   
ReplyQuote
(@farzad_k)
Member
Joined: 3 years ago
Posts: 75
Topic starter  
Posted by: @arlo

Farzad,

    You might want to check out toptechboy.com, Paul has put together a tutorial on Python starting with the install  Here. 

Hope this helps.

Arlo

Thanks, Arlo. The instructions were very useful.

 

Farzad


   
ReplyQuote
(@farzad_k)
Member
Joined: 3 years ago
Posts: 75
Topic starter  

Hello.

Back to this topic again after installing Python, Pyserial, then GIT, etc. and still having problems getting the board to communicate with the PC. I have tested USB communication with Arduino using a Leonardo that I have and it works fine. But the Heltec ESP32 just doesn't get recognized as being attached to the COM port that becomes available after the driver for it is installed.

 

I will be posting a separate thread to narrow down the question and look for success stories that perhaps I can learn from.

 

Farzad


   
ReplyQuote