Jump to content
Electronics-Lab.com Community

Search the Community

Showing results for tags 'microcontroller'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Electronics Forums
    • Projects Q/A
    • Datasheet/Parts requests
    • Electronic Projects Design/Ideas
    • Power Electronics
    • Service Manuals
    • Theory articles
    • Electronics chit chat
    • Microelectronics
    • Electronic Resources
  • Related to Electronics
    • Spice Simulation - PCB design
    • Inventive/New Ideas
    • Mechanical constructions/Hardware
    • Sell/Buy electronics - Job offer/requests
    • Components trade
    • High Voltage Stuff
    • Electronic Gadgets
  • General
    • Announcements
    • Feedback/Comments
    • General
  • Salvage Area


  • Community Calendar

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 7 results

  1. ESP-NOW is a wireless communication protocol based on the data-link layer that enables the direct, quick, and low-power control of smart devices without the need for a router. Espressif defines it and can work with Wi-Fi and Bluetooth LE. ESP-NOW provides flexible and low-power data transmission to all interconnected devices. It can also be used as an independent protocol that helps with device provisioning, debugging, and firmware upgrades. ESP-NOW is a connectionless communication protocol developed by Espressif that features short packet transmission. This protocol enables multiple devices to talk to each other in an easy way. It is a fast communication protocol that can be used to exchange small messages (up to 250 bytes) between ESP32 or ESP8266 boards. ESP-NOW supports the following features: Encrypted and unencrypted unicast communication; Mixed encrypted and unencrypted peer devices; Up to 250-byte payload can be carried; Sending callback function that can be set to inform the application layer of transmission success or failure. 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. How is it different from existing protocols? ESP-NOW is a wireless communication protocol that is different from Wi-Fi and Bluetooth in that it reduces the five layers of the OSI model to only one1. Additionally, ESP-NOW occupies fewer CPU and flash resources than traditional connection protocols while co-exists with Wi-Fi and Bluetooth LE. Bluetooth is used to connect short-range devices for sharing information, while Wi-Fi is used for providing high-speed internet access2. Wi-Fi provides high bandwidth because the speed of the internet is an important issue. Max Distance: The range of ESP-NOW is up to 480 meters when using the ESP-NOW protocol for bridging between multiple ESP32s1. The range can be further increased by enabling long-range ESP-NOW. When enabled, the PHY rate of ESP32 will be 512Kbps or 256Kbps. Maximum nodes: ESP-NOW supports various series of Espressif chips, providing a flexible data transmission that is suitable for connecting “one-to-many” and “many-to-many” devices. Applications: ESP-NOW is widely used in smart-home appliances, remote controlling, sensors, etc. In this tutorial, will see how to implement a basic ESP NOW communication between ESP32 Microcontrollers. Step: 1 ESPNOW communication works based on the MAC address of the nodes. So, we need to find the Mac address of our slave or receiver node. ]For that just upload the following sketch to the ESP32 board and look for the Mac address in the serial monitor. #include "WiFi.h" void setup(){ Serial.begin(115200); WiFi.mode(WIFI_MODE_STA); Serial.println(WiFi.macAddress()); } void loop(){ } Once you uploaded the code, press the EN button and wait for the serial monitor results. It will show you the Mac address. Note that. Step-2: Next, we need to prepare the transmitter, for that use this example sketch which can send multiple data types of data to the particular slave node. #include <esp_now.h> #include <WiFi.h> // REPLACE WITH YOUR RECEIVER MAC Address uint8_t broadcastAddress[] = {0x94, 0xB5, 0x55, 0x26, 0x27, 0x34}; // Must match the receiver structure typedef struct struct_message { char a[32]; int b; float c; bool d; } struct_message; // Create a struct_message called myData struct_message myData; esp_now_peer_info_t peerInfo; // callback when data is sent void OnDataSent(const uint8_t *mac_addr, esp_now_send_status_t status) { Serial.print("\r\nLast Packet Send Status:\t"); Serial.println(status == ESP_NOW_SEND_SUCCESS ? "Delivery Success" : "Delivery Fail"); } void setup() { // Init Serial Monitor Serial.begin(115200); // Set device as a Wi-Fi Station WiFi.mode(WIFI_STA); // Init ESP-NOW if (esp_now_init() != ESP_OK) { Serial.println("Error initializing ESP-NOW"); return; } // Once ESPNow is successfully Init, we will register for Send CB to // get the status of Trasnmitted packet esp_now_register_send_cb(OnDataSent); // Register peer memcpy(peerInfo.peer_addr, broadcastAddress, 6); peerInfo.channel = 0; peerInfo.encrypt = false; // Add peer if (esp_now_add_peer(&peerInfo) != ESP_OK){ Serial.println("Failed to add peer"); return; } } void loop() { // Set values to send strcpy(myData.a, "I'm alive"); myData.b = random(1,20); myData.c = 1.2; myData.d = false; // Send message via ESP-NOW esp_err_t result = esp_now_send(broadcastAddress, (uint8_t *) &myData, sizeof(myData)); if (result == ESP_OK) { Serial.println("Sent with success"); } else { Serial.println("Error sending the data"); } delay(2000); } Here are the serial monitor results, it show sent success but not delivered. Because we don't have the receiver. Let's try to implement the receiver. Step-3: Step-3:d example sketch which can receive the data from the master and it will print that into the serial monitor. #include <esp_now.h> #include <WiFi.h> // Structure example to receive data typedef struct struct_message { char a[32]; int b; float c; bool d; } struct_message; // Create a struct_message called myData struct_message myData; // callback function that will be executed when data is received void OnDataRecv(const uint8_t * mac, const uint8_t *incomingData, int len) { memcpy(&myData, incomingData, sizeof(myData)); Serial.print("Bytes received: "); Serial.println(len); Serial.print("Char: "); Serial.println(myData.a); Serial.print("Int: "); Serial.println(myData.b); Serial.print("Float: "); Serial.println(myData.c); Serial.print("Bool: "); Serial.println(myData.d); Serial.println(); } void setup() { // Initialize Serial Monitor Serial.begin(115200); // Set device as a Wi-Fi Station WiFi.mode(WIFI_STA); // Init ESP-NOW if (esp_now_init() != ESP_OK) { Serial.println("Error initializing ESP-NOW"); return; } // get recv packer info esp_now_register_recv_cb(OnDataRecv); } void loop() { } Serial monitor results. Wrap Up: We have seen how to implement the ESP NOW in ESP32 microcontroller, in upcoming tutorials will see how to transmit sensor data via ESPNOW.
  2. I'm programming ATtiny13A with arduino. I want to use "stepper.h" library but it seems it is only supported on arduino or atmega series but not on attiny. Is there any way I can fix it? Thank you!
  3. Microcontrollers are known for its low power usage and limited resources thus often deemed unable to understand Python script as Python need interpretor to translate script into machine langauge and intepretor are usaully quite resource-consuming. However, MicroPython has arisen as a lean and efficiant Python 3 interpretor that can be run on ARM Cortex-M series microcontrollers. Ameba RTL8722 is an ARM Cortex-M33 microcontroller that has dual-band WiFi and BLE 5.0, other than that it is fully capable of running MicroPython and controls WiFi using Python script. In addition, its requirement for developing platform is also quite minimal-- only needs a serial port terminal like Tera term. Here is an example of RTL8722 controlling WiFi using just a few lines of Python code on Tera Term, from wireless import WLAN wifi = WLAN(mode = WLAN.STA) wifi.scan() Right after the last line, you will be able to see the result printed on the Tera term almost immediately, Hope this post give you some ideas of how easy it is to control microcontroller using MicroPython, stay tuned and happy coding!
  4. What is RISC-V? RISC-V has in the recent past attracted the attention of major corporations across the globe like Google, NVIDIA, and Qualcomm among others. It has thrown developers into a frenzy. What exactly is RISC-V though? RISC-V is an instruction set architecture (ISA) that is open source and based on RISC principles. In essence, an ISA is an interface between software and hardware. ISA defines the supported registers, data type, main memory hardware support, and the I/O model of implementation of the ISA. RISC-V was developed at the University of California Berkeley in 2010. It is a simplified architecture thus is well adopted for speed and low power operation. RISC-V based chips are therefore good for commercial applications. Getting started with RISC-V The LoFive FE310 The best way to get hands-on experience with RISC-V is through development boards that are based on RISC-V processors. One such board is the LoFive FE 310 by GroupGets LLC. The board comes with a RISC-V processor that can run up to 320 MHz. It also has 8KB of one-time-programmable memory, 8KB of OTM, 16kb of SRAM, and 16KB of instruction cache. The FE310 also has 3 independent pulse width modulation controllers, UART, SPI, and I2C. The board either has headers soldered to it or it can be soldered onto the carrier board where it can be used as the processor. It has an onboard QSPI flash that is provided through the IS25LP128 module. The flash module is 128Mbit, 16KB module. It can operate at SPI bus speeds of up to 133MHz if used in quad I/O mode. This flash module can be used for storage thus ensuring that there is sufficient space for storing apps or run-time data. The development board also runs on 5 volts which is further converted to 3.3V by the onboard SPX3819M5 which provides up to 500 mA. The FE301 does not draw much current so it can support other devices and sensors. All the design details of the FE301 for instance the schematics and BOM are readily available on GitHub. Setting up the development board There are numerous toolchains available for use with RISC-V depending on the board you choose. RISC-v SDK is available for Linux, Windows, and macOS. There two versions of SDK available, the legacy SDK, and the latest version. Use the latest version as it has a prebuilt toolchain and has OpenOCD for debugging. You can program the development board using several different ways. You could use the standard JTAG on the processor. You can access this through the LoFive-R1 expansion connectors. You can use any programmer that supports JTAG like SEGGER J-LINK. If you can’t find such, you can use a low-cost USB-to-serial converter like the FT223H-56Q mini MDL. The converter hosts all the connections and breakouts needed to interface to the FE301. RISC-V SDK uses general purpose Input/output available on the FT2232H-56Q to come up with the necessary JTAG connection to program the microcontroller. Below are the connections that need to be made between the LoFive-R1 and the ST2232H-56Q You can make these connections directly or using a breadboard. If you are using the development board for the first time, it’s prudent to install a bootloader on board. The bootloader is installed once and could be used to implement upgrades later. Summary RISC-V is ideal for developers intending to use open-source hardware architecture. There are numerous development boards one could use. Setting it up is also not difficult. The only shortcoming with it is that its ecosystem is not as rich as that of other microcontroller platforms. RISC-V is very intriguing though.
  5. Hi, I'm fairly new to microcontrollers and have read multiple guides, although still asking the question. I have used Arduino for quite a long time and have developed some product concept. I am only 14 years old though. I am currently developing a wearable project, therefore size, weight, and battery are huge constraints. My project will include; Touch OLED, Gyro, IR LED and receiver. As I have used Arduino, I am quite familiar with the Arduino offset of C++. It will be appreciated if the MCU has example codes/ others have used similar components. Could you please help me on both; hardware and software. Thankyou in advance.
  6. I am trying to make this KITT's dash compass andi have the leds and using a microcontroller to power them but need help on how to wire them so i use the least amount of conponents possable. I thought of darlington transistor ic's but on the 4 10 led bargraph onesi think both anode n cathode will need darlington transistors. 4 1 for either common cathode or anode and 10 more for the other lead for make the patterns. I might be able to use 1 darlington transistor ic to make the yellow triangle leds work using just 4 i/o pins, but i think i need 14 for the red bargraps whats the best way to wire the bargraph leds up? Thanks. Joe
  7. infrared signal is used as the "trigger" for the operation of dc motors(or any other appropriate devices eg:LEDs). i have used the arduino uno as the microcontroller as it simply does the job!also it's cheap too!! future application will ultimately lead to IR controlled robot,and perhaps controlling of human mind using nothing but a simple remote control and interfacing hardware with electrodes,so that the physically disabled can attain normal "motor" functions.thanks.
  • Create New...