Notifications
Clear all

ESP32 Setting up for And Problems with the pyserial


Farzad_k
(@farzad_k)
Eminent Member
Joined: 3 weeks ago
Posts: 44
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
(@arlo)
Eminent Member
Joined: 6 months ago
Posts: 22
 

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 liked
ReplyQuote
DaveE
(@davee)
Estimable Member
Joined: 4 months ago
Posts: 137
 

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 liked
ReplyQuote
Farzad_k
(@farzad_k)
Eminent Member
Joined: 3 weeks ago
Posts: 44
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
(@farzad_k)
Eminent Member
Joined: 3 weeks ago
Posts: 44
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