Tag: Thonny IDE
-
Introduction to strings in MicroPython on Raspberry Pi Pico
Strings are a fundamental data type in programming, and they are no exception in MicroPython on Raspberry Pi Pico. A string is a sequence of characters enclosed in single or double quotes. Strings are used to represent text in programs, and they can be manipulated in various ways to achieve different results. In this blog…
-
Functions in MicroPython on Raspberry Pi Pico
Functions are a way to make your code more organized and easier to understand. They are like little machines that you can use over and over again in your code. To create a function, you need to give it a name and then write what it does. You can also give it some inputs, like…
-
How to interface 0.96″ OLED display with Raspberry Pi Pico without library using I2C in Micropython
The 0.96-inch OLED screen is monochromatic blue. Which means it has only blue light. You can either switch on the led to make the text blue or you can invert the in which background is blue and the text black. The OLED uses a ssd1306 IC. Which is a 128 x 64 Dot Matrix OLED/PLED…
-
Using Loops to Iterate Over Data Structures in MicroPython on Raspberry Pi Pico
MicroPython on Raspberry Pi Pico provides several data structures for storing and manipulating data. These include lists, tuples, sets, and dictionaries. Loops are a powerful tool for iterating over these data structures and performing operations on their elements. Let’s take a look at some examples of how loops can be used to iterate over data…
-
Loop Control Statements in MicroPython on Raspberry Pi Pico
Loop control statements are used to alter the normal flow of execution within loops. They can be used to skip iterations or terminate loops prematurely based on certain conditions. In MicroPython on Raspberry Pi Pico, there are three loop control statements: break, continue, and pass. Here’s an example: In this example, the loop will iterate…
-
Nested Loops in MicroPython on Raspberry Pi Pico
Nested loops in MicroPython on Raspberry Pi Pico refer to the use of one loop inside another loop. The inner loop is executed multiple times for each iteration of the outer loop. This technique is useful when we want to perform repetitive tasks or calculations on a set of data. To create nested loops in…
-
For Loops in MicroPython on Raspberry Pi Pico
For loops are one of the most commonly used loops in programming, including MicroPython on Raspberry Pi Pico. They allow you to repeat a set of instructions a specific number of times, making your code more efficient and concise. In MicroPython, a for loop is used to iterate over a sequence of values, such as…
-
While Loops in MicroPython on Raspberry Pi Pico
While loops in MicroPython on Raspberry Pi Pico are used to execute a block of code repeatedly as long as a certain condition is true. The general syntax for a while loop is: The condition is checked at the beginning of each iteration. If the condition is true, the code inside the loop is executed.…
-
Introduction to Loops in MicroPython on Raspberry Pi Pico
Loops are an essential part of any programming language, including MicroPython on Raspberry Pi Pico. They allow you to execute a block of code repeatedly, saving you time and effort. In this article, we’ve introduced you to the two types of loops in MicroPython: for loops and while loops. What are Loops?A loop is a…
-
Conditional Statements in MicroPython on Raspberry Pi Pico
Conditional statements in MicroPython on Raspberry Pi Pico are used to make decisions based on certain conditions. They allow us to execute a block of code only if a certain condition is true, or to execute a different block of code if the condition is false. In MicroPython, we use the if, elif, and else…