Installing Thonny IDE for Raspberry Pi Pico Programming

Hello readers, I hope you all are doing great. In our previous tutorial, we discussed the installation procedure of Visual Studio Code for programming Raspberry Pi Pico.

We have already mentioned in our previous tutorials that RP2040 or Raspberry Pi Pico supports multiple programming languages like C/C++, Circuit python, MicroPython cross-platform development environments. Raspberry Pi Pico module consists of a built-in UF2 bootloader enabling programs to be loaded by drag and drop and floating-point routines are baked into the chip to achieve ultra-fast performance.

There are multiple development environments to program a Raspberry Pi Pico board like Visual Studio Code, Thonny Python IDE, Arduino IDE etc.

So, in this tutorial, we will learn how to install Thonny Python IDE to program the Raspberry Pi Pico board using Micropython programming language.

Downloading Thonny Python IDE for Windows

Thonny Python IDE (Integrated development environment) is a development tool designed for beginners. The major feature of using Thonny is that it is easy to operate and this development environment also provides a faithful representation of function calls. The Thonny IDE is compatible with Linux, MacOS and Windows OS.

  • To download the Thonny Python IDE follow the given link: https://thonny.org/
  • This is the official website of Thonny where we have different download versions for different OS.
  • Click on ‘Windows’ to download the installation setup for Windows OS (as shown below).

Fig. 1 Download thonny

Installing Thonny Python IDE

  • Once the installation setup is downloaded successfully for Windows next step is the installation of the IDE.
  • To install the Thonny Python IDE in your system, double-click on the downloaded file.
  • Select “Install for all users”.

Fig. 2 Choose Installation Mode

  • Follow the basic installation procedure.
  • Accept the license agreement and press next.

Fig. 3 Accept the agreement

  • Select the installation/destination location.
  • You can keep the default location or you can also change the location by clicking on

Fig. 4 installation location

  • Now, select the “Start menu folder” and press ‘Next’.
  • If you want to create a desktop icon for Thonny then check the respective icon and press Next (as shown below).

Fig. 5 Desktop icon

  • Finally, press Install to install the setup.

Configuring the Raspberry Pi Pico for programming with MicroPython

MicroPython is a programming language that runs directly on embedded hardware, for example, ESP and Raspberry Pi Pico. It is a full implementation of the Python (3) programming language.

Programming Raspberry Pi Pico is a very easy process. Users can program the board by connecting it via USB port, and then just drag and drop the file into Raspberry Pi Pico.

Download the MicroPython UF2 file

    • To download the micropython UF2 file for raspberry Pi Pico programming follow the given link :

https://www.raspberrypi.com/documentation/microcontrollers/micropython.html

  • Scroll down the page for MicroPython UF2 file and download the file to your system, as shown below:

Fig. 6 Download Micropython UF2 file

Connecting Raspberry Pi Pico board with laptop/computer

  • Press and hold the BOOTSEL button from the Raspberry Pi Pico development board.
  • Connect or plug the Raspberry Pi Pico board to your system/computer via USB cable and release the BOOTSEL button once the Pico is connected to the computer.
  • Now you should see a new volume in your system i.e., RPI-RP2.
  • Drag and drop the downloaded MicroPython UF2 file into RPI-RP2 This UF2 file will reboot your system.
 

Select Interpreter and Install MicroPython Firmware

  • Open the Thonny IDE.
  • Go to Run >> Select Interpreter.

Fig. 7 Select Interpreter

  • Select the necessary/required interpreter which is MicroPython (Raspberry Pi Pico) as shown below:

Fig. 8 MicroPython for Raspberry Pi Pico

  • Press “Install or update firmware”.
  • Again press Install.
  • Make sure that your system is connected to internet.

How to check whether Micropython firmware is installed successfully or not and whether it is working or not?

  • Go to View >>
  • In the file list (on left side of the screen) a complete list of all the local files and document saved on your system will be displayed and along with that your should see Raspberry Pi Pico file in the same list (this is the file saved in Pico).
  • Again go to View >> Shell.
  • In shell type some command like printing a message as shown below:

Fig. 9 Printing a message with MicroPython (Pi Pico)

  • If the command is executed successfully means the firmware is successfully installed or updated and we are ready to program our Raspberry Pi Pico with Thonny integrated development environment.

Conclusion

So, this concludes the tutorial and the installation procedure of Thonny Python IDE (Windows) for raspberry Pi Pico programming.

In our next tutorial we will discuss how to write a program for raspberry Pi Pico programming to control GPIOs using MicroPython programming language.

Selecting Payment Gateways for eCommerce Websites

The eCommerce industry, which has already experienced year-over-growth for the past five years, gained a monumental boost after the pandemic made online shopping mainstream. Today, there are more than 20 million eCommerce businesses operating worldwide, and new companies open shops every day.

The majority of these companies need skilled developers and engineers to build safe and robust eCommerce sites to house their businesses. If you are interested in specializing in eCommerce development, you would be remiss to ignore the advantages and disadvantages of each payment gateway option.

Payment gateways allow online customers to purchase products seamlessly and securely. However, they are not all created equal. As an engineer or site developer, you should understand the technical and practical implications of each payment gateway type.

What is a Payment Gateway?

All businesses need a way to collect money from their customers. While a brick-and-mortar shop uses a cash register and payment terminals to manage its transactions, online retailers must use web-based options.

To protect customer information from being hacked during the transaction, eCommerce shops use payment gateways to encrypt user data and authorize the transaction.

Gateways can also perform functions that you may have encountered when paying with a credit card. For example, gateways can automatically calculate tax, shipping costs, and custom fees based on the customer’s location and accept payments in multiple currencies.

Since the first payment gateway came online in 1996, there have been numerous innovations in technology and software. Today, customers and retailers can choose from dozens of options, including providers that operate in specific regions of the world. Many gateways do not even interact with banks, and instead, draw and deposit money from virtual wallets or accounts.

Classes of Payment Gateway

When integrating a payment system for a client, you must consider how each gateway type will impact the customer experience and the retailer’s bottom line.

Systems that are flawed, appear unprofessional, or constantly crash can put off customers and lower sales. Relatedly, while customers prefer to select from multiple payment options, having too many integrated into one shop can also make customers wary.  It is essential to understand your client’s business and end clients to select the best class of payment gateway for their eCommerce site.

Hosted

This payment gateway moves customers from the eCommerce site to the payment service provider’s web page to complete the transaction. If the provider is widely-known and trusted, such as PayPal, this can increase customer confidence. However, this will have the opposite effect if the provider is not a household name.

Further, while leveraging the name recognition and secure infrastructure of a large payment service provider can help boost sales, retailers are reliant on a third party to handle transactions. Customers will have to go through the payment service provider to handle issues with payment processing, refunds, and other transactions. If the third party does a poor job, it can affect your clients’ businesses.

Onsite

Clients can also maintain a payment gateway directly on their website. When a customer pays, the transaction through an embedded payment gateway is connected directly to the retailer’s account.

Many invoicing and bookkeeping software offer this type of payment gateway. Onsite providers give retailers more control over the customer’s experience, but there is no outside support for handling issues.

API

Retailers who want complete oversight of their payment gateway may prefer an Application Programming Interface hosted system. The look and feel of the system can be designed to fit the company’s branding and culture.

However, if you build this type of gateway, you are also responsible for ensuring it meets all of the security requirements for handling customer financial data. You can ensure compliance under the Payment Card Industry Data Security Standard by following a PCI DSS compliance checklist.

Bank Integration

Finally, small-scale vendors may opt for the security, ease, and reputation of a bank-integrated payment gateway. These systems are integrated within the banking system to facilitate virtual bank-to-bank transactions. Zelle, one of the largest such gateways in the U.S., is compatible with more than 30 national banks, including Bank of America and Chase.

While bank integrated payments are instant and often incur no fees, they are only accessible to customers with an account at a participating bank. This can greatly reduce accessibility, especially on the international market.  Also, many of these gateways cannot handle high-volume transactions.

Keeping Gateways Secure

If you are working with an established payment service provider like PayPal, Apple Pay, or a bank integrated gateway, you can rest assured that the system is compliant and secure.

However, if your client is interested in an API-hosted gateway, you will need to be much more diligent. In addition to adhering to the PCI DSS, you will need to install a Secure Sockets Layer (SSL) certificate to ensure the website can transmit and receive encrypted data securely. The highest quality SSL certificate runs about $1,000 per year, but affordable and secure options cost around $60 per year.

Syed Zain Nasir

I am Syed Zain Nasir, the founder of <a href=https://www.TheEngineeringProjects.com/>The Engineering Projects</a> (TEP). I am a programmer since 2009 before that I just search things, make small projects and now I am sharing my knowledge through this platform.I also work as a freelancer and did many projects related to programming and electrical circuitry. <a href=https://plus.google.com/+SyedZainNasir/>My Google Profile+</a>

Share
Published by
Syed Zain Nasir