Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
projets:cmdcentrale [2020/01/01 10:15] – [Matos] chefprojets:cmdcentrale [2020/11/08 14:33] (Version actuelle) chef
Ligne 4: Ligne 4:
  
 ===== Matos ===== ===== Matos =====
-Je vais essayer d'utiliser la carte MEGAWIFI de Robodyn.\\ 
-Sa description se trouve ici.\\ 
  
-Cette carte contient un Arduino MEGA et un ESP dans une carte au dimension d'un ESP.+  * MEGA+WiFi R3 ATmega2560+ESP8266, flash 32MB, USB-TTL CH340G, Micro-USB de ROBODYN. 
 +  * Afficheur Touchscreen TFT ILI9486. 
 +  * Emetteur/Récepteur RF433MHz. 
 +  * Module RTC I2C 24C32 mémoire DS1307 horloge. 
 +  * Une alimentation 220v/12V
  
 +Pour mon projet, je vais essayé d'utiliser mon Mega-WIFI de Robodyn. \\
 +[[https://robotdyn.com/mega-wifi-r3-atmega2560-esp8266-flash-32mb-usb-ttl-ch340g-micro-usb.html|Doc du produit]] \\
 +{{:test:2_mega2560-wifi-r3-atmega2560-esp8266-32-mo-de-m-moire-usb-ttl-ch340g-compatible-pour-arduino.jpg?400|}} \\
 +En gros il s'agit d'un Arduino Mega couplé avec un ESP sur la même carte au dimension du Mega.\\
 +Grace à des minidip, on peu utiliser l'arduino ou l'esp seul, relié par le port RS232 TX3/RX3 du mega à l'ESP, ou ensemble.\\
 +Du coup on a un arduino Mega avec toute sa mémoire et sa puissance, que l'on peu connecter au WIFI vie l'ESP.
  
 +Quelques liens: \\
 +  * [[https://habr.com/ru/post/402429/|En russe (vive google translate)]]
 +  * [[https://www.instructables.com/id/Arduino-MEGA-2560-With-WiFi-Built-in-ESP8266/|Un instructabes]]
 +
 +Il y a sans doute d'autre site, mais ceux cités permette déjà de bien comprendre le fonctionnement.\\
 Elle ne fonctionne pas exactement comme une carte MEGA, notamment au niveau des interruptions. Elle ne fonctionne pas exactement comme une carte MEGA, notamment au niveau des interruptions.
 +
 <code> <code>
-General information+    Serials 0 (RX) and 1 (TX);  
 +    Serial 1s 19 (RX) and 18 (TX);  
 +    Serial 2s 17 (RX) and 16 (TX);  
 +    Serial 3s 15 (RX) and 14 (TX).  
 +    Used to receive (RX) and transmit (TX) TTL serial data.  
 +    Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip. 
 +     
 +    External Interrupts:  
 +    2 (interrupt 0),  
 +    3 (interrupt 1),  
 +    18 (interrupt 5),  
 +    19 (interrupt 4),  
 +    20 (interrupt 3),  
 +    21 (interrupt 2).  
 +    These pins can be configured to trigger an interrupt on a low level, a rising or falling edge, or a change in level.  
 +    See the attachInterrupt() function for details. 
 +     
 +    PWM: 2 to 13 and 44 to 46.  
 +    Provide 8-bit PWM output with the analogWrite() function. 
 +     
 +    SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS).  
 +    These pins support SPI communication using the SPI library.  
 +    The SPI pins are also broken out on the ICSP header, which is physically compatible with the Uno and the old Duemilanove and Diecimila boards. 
 +     
 +    LED: 13. There is a built-in LED connected to digital pin 13.  
 +    When the pin is HIGH value, the LED is on, when the pin is LOW, it’s off. 
 +     
 +    TWI: 20 (SDA) and 21 (SCL).  
 +    Support TWI communication using the Wire library.  
 +    Note that these pins are not in the same location as the TWI pins on the old Duemilanove or Diecimila boards. 
 +    The Mega 2560 has 16 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values).  
 +    By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function.
  
-The Mega is a microcontroller board based on the ATmega2560. It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), the 16MHz crystal, the USB-B connection, the DC power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started.+</code>
  
-The Mega 2560 R3 also adds SDA and SCL pins next to the AREF, placed near the RESET pin. One is the IOREF that allow the shields to adapt to the voltage provided from the board. The other is a not connected and is reserved for future purposes. The Mega 2560 R3 works with all existing shields but can adapt to new shields which use these additional pins. +Pour programmer le Mega ou l'ESP voici le tableau de switch :
-Programming+
  
-The Mega 2560 board can be programmed with the Arduino Software (IDE).+{{:projets:1.png?300|}}
  
-The Mega 2560 comes preprogrammed with a bootloader that allows you to upload new code to it without the use of an external hardware programmer.+|Switch status and mode selection: |1|2|3|4|5|6|7|8| 
 +|CH340 connect to ESP8266 (upload sketch) |OFF|OFF|OFF|OFF|ON|ON|ON|NoUSE| 
 +|CH340 connect to ESP8266 (connect)|OFF|OFF|OFF|OFF|ON|ON|OFF|NoUSE| 
 +|CH340 connect to ATmega2560 (upload sketch)|OFF|OFF|ON|ON|OFF|OFF|OFF|NoUSE| 
 +|CH340 connect to Mega2560 COM3 connect to ESP8266|ON|ON|ON|ON|OFF|OFF|OFF|NoUSE| 
 +|Mega2560+ESP8266|ON|ON|OFF|OFF|OFF|OFF|OFF|NoUSE| 
 +|All modules work independent|OFF|OFF|OFF|OFF|OFF|OFF|OFF|NoUSE|
  
-You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header using ISP or similar.+Voici où change le port série entre le mega et l'ESP :\\ 
 +{{:projets:2.png?300|}}
  
-For USB-UART interface used the ATmega16U2+Après avoir changer le mode sur la carte, il faut configurer l'IDE.\\ 
-Power+Il est important quand l'ESP est programé de presser le bouton "MODE"\\  
 +After choosing the mode of the board can proceed to set up the IDE \\ 
 +It is important that when the ESP8266 module is programming, it is necessary to press the button “Mode” \\
  
-The Mega 2560 can be powered via the USB connection or with an external power supply. The power source is selected automatically.+{{:projets:3.png?600|}}
  
-External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board’s power jack. Leads from a battery can be inserted in the NDD and vin pin headers of the POWER connector. 
- 
-The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts. 
-Memory 
- 
-The ATmega2560 has 256KB of flash memory for storing code (of which 8 KB is used for the bootloader), 8 KB of SRAM and 4 KB of EEPROM. 
-Input and Output (I/O) 
- 
-Each of the 54 digital pins on the Mega can be used as an input or output. They operate at 5 volts. Each pin can provide or receive 20 mA as recommended operating condition and has an internal pull-up resistor (disconnected by default) of 20-50 k ohm. A maximum of 40mA is the value that must not be exceeded to avoid permanent damage to the microcontroller. 
- 
-In addition, some pins have specialized functions: 
- 
-    Serials 0 (RX) and 1 (TX); Serial 1s 19 (RX) and 18 (TX); Serial 2s 17 (RX) and 16 (TX); Serial 3s 15 (RX) and 14 (TX). Used to receive (RX) and transmit (TX) TTL serial data. Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip. 
-    External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2). These pins can be configured to trigger an interrupt on a low level, a rising or falling edge, or a change in level. See the attachInterrupt() function for details. 
-    PWM: 2 to 13 and 44 to 46. Provide 8-bit PWM output with the analogWrite() function. 
-    SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI communication using the SPI library. The SPI pins are also broken out on the ICSP header, which is physically compatible with the Uno and the old Duemilanove and Diecimila boards. 
-    LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it’s off. 
-    TWI: 20 (SDA) and 21 (SCL). Support TWI communication using the Wire library. Note that these pins are not in the same location as the TWI pins on the old Duemilanove or Diecimila boards. 
-    The Mega 2560 has 16 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function. 
- 
-There are a couGeneral information 
- 
-The Mega is a microcontroller board based on the ATmega2560. It has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), the 16MHz crystal, the USB-B connection, the DC power jack, an ICSP header, and a reset button. It contains everything needed to support the microcontroller; simply connect it to a computer with a USB cable or power it with an AC-to-DC adapter or battery to get started. 
- 
-The Mega 2560 R3 also adds SDA and SCL pins next to the AREF, placed near the RESET pin. One is the IOREF that allow the shields to adapt to the voltage provided from the board. The other is a not connected and is reserved for future purposes. The Mega 2560 R3 works with all existing shields but can adapt to new shields which use these additional pins. 
-Programming 
- 
-The Mega 2560 board can be programmed with the Arduino Software (IDE). 
- 
-The Mega 2560 comes preprogrammed with a bootloader that allows you to upload new code to it without the use of an external hardware programmer. 
- 
-You can also bypass the bootloader and program the microcontroller through the ICSP (In-Circuit Serial Programming) header using ISP or similar. 
- 
-For USB-UART interface used the ATmega16U2. 
-Power 
- 
-The Mega 2560 can be powered via the USB connection or with an external power supply. The power source is selected automatically. 
- 
-External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a 2.1mm center-positive plug into the board’s power jack. Leads from a battery can be inserted in the NDD and vin pin headers of the POWER connector. 
- 
-The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may supply less than five volts and the board may become unstable. If using more than 12V, the voltage regulator may overheat and damage the board. The recommended range is 7 to 12 volts. 
-Memory 
- 
-The ATmega2560 has 256KB of flash memory for storing code (of which 8 KB is used for the bootloader), 8 KB of SRAM and 4 KB of EEPROM. 
-Input and Output (I/O) 
- 
-Each of the 54 digital pins on the Mega can be used as an input or output. They operate at 5 volts. Each pin can provide or receive 20 mA as recommended operating condition and has an internal pull-up resistor (disconnected by default) of 20-50 k ohm. A maximum of 40mA is the value that must not be exceeded to avoid permanent damage to the microcontroller. 
- 
-In addition, some pins have specialized functions: 
- 
-    Serials 0 (RX) and 1 (TX); Serial 1s 19 (RX) and 18 (TX); Serial 2s 17 (RX) and 16 (TX); Serial 3s 15 (RX) and 14 (TX). Used to receive (RX) and transmit (TX) TTL serial data. Pins 0 and 1 are also connected to the corresponding pins of the ATmega16U2 USB-to-TTL Serial chip. 
-    External Interrupts: 2 (interrupt 0), 3 (interrupt 1), 18 (interrupt 5), 19 (interrupt 4), 20 (interrupt 3), and 21 (interrupt 2). These pins can be configured to trigger an interrupt on a low level, a rising or falling edge, or a change in level. See the attachInterrupt() function for details. 
-    PWM: 2 to 13 and 44 to 46. Provide 8-bit PWM output with the analogWrite() function. 
-    SPI: 50 (MISO), 51 (MOSI), 52 (SCK), 53 (SS). These pins support SPI communication using the SPI library. The SPI pins are also broken out on the ICSP header, which is physically compatible with the Uno and the old Duemilanove and Diecimila boards. 
-    LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the LED is on, when the pin is LOW, it’s off. 
-    TWI: 20 (SDA) and 21 (SCL). Support TWI communication using the Wire library. Note that these pins are not in the same location as the TWI pins on the old Duemilanove or Diecimila boards. 
-    The Mega 2560 has 16 analog inputs, each of which provide 10 bits of resolution (i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible to change the upper end of their range using the AREF pin and analogReference() function. 
- 
-There are a couple of other pins on the board: 
- 
-    AREF. Reference voltage for the analog inputs. Used with analogReference(). 
-    Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board. 
- 
-See also the mapping Mega 2560 PinOut diagram 
-Communication 
- 
-The Mega 2560 board has a number of facilities for communicating with a computer, another board, or other microcontrollers. The ATmega2560 provides four hardware UARTs for TTL (5V) serial communication. An ATmega16U2 on the board channels one of these over USB and provides a virtual com port to software on the computer (Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically. The Arduino Software (IDE) includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1).ple of other pins on the board: 
- 
-    AREF. Reference voltage for the analog inputs. Used with analogReference(). 
-    Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to shields which block the one on the board. 
- 
-See also the mapping Mega 2560 PinOut diagram 
-Communication 
- 
-The Mega 2560 board has a number of facilities for communicating with a computer, another board, or other microcontrollers. The ATmega2560 provides four hardware UARTs for TTL (5V) serial communication. An ATmega16U2 on the board channels one of these over USB and provides a virtual com port to software on the computer (Windows machines will need a .inf file, but OSX and Linux machines will recognize the board as a COM port automatically. The Arduino Software (IDE) includes a serial monitor which allows simple textual data to be sent to and from the board. The RX and TX LEDs on the board will flash when data is being transmitted via the ATmega16U2 chip and USB connection to the computer (but not for serial communication on pins 0 and 1). 
-</code> 
 ===== Description ===== ===== Description =====
 Cette centrale à pour interfaces :\\ Cette centrale à pour interfaces :\\
Ligne 133: Ligne 110:
  
 ===== Schémas ===== ===== Schémas =====
 +A FAIRE !
 ===== Programme ===== ===== Programme =====
  
projets/cmdcentrale.txt · Dernière modification : 2020/11/08 14:33 de chef
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0