- Honor 400 - és mégis mozog a kép
- Android alkalmazások - szoftver kibeszélő topik
- Apple Watch
- Milyen GPS-t vegyek?
- Apple iPhone 16 Pro - rutinvizsga
- iGO Primo
- Hónap végén érkezik a Xiaomi Band 10, ára is van
- Google Pixel 9a - a lapos munka
- Mi nincs, grafén akku van: itt a Xiaomi 11T és 11T Pro
- Bemutatkozott a Poco X7 és X7 Pro
-
Mobilarena
Arduino hardverrel és szoftverrel foglakozó téma. Minden mikrovezérlő ami arduinoval programozható, és minden arduino program, board, és hardverrel kapcsolatos kérdések helye.
Új hozzászólás Aktív témák
-
peter1998
tag
Egy enc28j60-as ethernet modult sikerült beszereznem.Hozzá a könyvtárat is.
#include <EtherCard.h>
// ethernet interface mac address, must be unique on the LAN
static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };
byte Ethernet::buffer[500];
BufferFiller bfill;
void setup () {
if (ether.begin(sizeof Ethernet::buffer, mymac, 53) == 0)
Serial.println( "Failed to access Ethernet controller");
if (!ether.dhcpSetup())
Serial.println("DHCP failed");
}
static word homePage() {
int masik = 12 ;
int kalap = 1333 ;
bfill = ether.tcpOffset();
bfill.emit_p(PSTR(
"<html>"
"<body onload="document.createElement('form').submit.call(document.getElementById('myForm'))">"
"<form id="myForm" name="myForm" action="http://192.168.1.10/add.php" method="GET">"
"<input type="hidden" name="temp1" value="remelem">"
"<input type="hidden" name="moi1" value="mukodik">"
"</form>"
"</body>"
"<asdasdasd>"
),
masik , kalap );
return bfill.position();
}
void loop () {
word len = ether.packetReceive();
word pos = ether.packetLoop(len);
if (pos) // check if valid tcp data is received
ether.httpServerReply(homePage()); // send web page data
}Ez lenne a programom.Sajnos ilyen hibakódot kapok:
Arduino: 1.6.4 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"
In file included from C:\Users\peti\Desktop\arduino-1.6.4\hardware\arduino\avr\cores\arduino/Arduino.h:28:0,
from C:\Users\peti\Desktop\arduino-1.6.4\libraries\ethercard-master/EtherCard.h:28,
from szerver2.ino:1:
szerver2.ino: In function 'word homePage()':
szerver2:28: error: expected ')' before 'document'
expected ')' before 'document'
This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.A kód annyit csinálna hogy ha felmegyek az oldalra akkor meghív automatikusan egy php fájlt és az pedig egy mysql-be ír.
Új hozzászólás Aktív témák
- BESZÁMÍTÁS! MSI B450M R5 3600 16GB DDR4 512GB SSD RTX 2060 Super 8GB THERMALTAKE Core V21 500W
- BESZÁMÍTÁS! Gigabyte B650M R7 7700 32GB DDR5 1TB SSD RTX 5070 12GB BE QUIET! Pure Base 500DX 650W
- Nintendo Switch OLED 20.1.1 okosított Dual-Boot Cfw + 256GB MicroSD + Atmosphere 1.9.1, 3 hó garival
- BESZÁMÍTÁS! Gigabyte A620M R5 7600 32GB DDR4 512GB SSD RTX 5060 Ti 16GB Zalman i3 NEO Enermax 650W
- BESZÁMÍTÁS! ASUS Z390 i5 9500 16GB DDR4 512GB SSD RTX 2060 Super 8GB Rampage SHIVA Thermaltake 500W
- Gyors, Precíz, Megbízható TELEFONSZERVIZ, amire számíthatsz! Akár 1 órán belül
- Samsung Galaxy A04 128GB, Kártyafüggetlen, 1 Év Garanciával
- LG 32GQ850-B - 32" NANO IPS ATW / 2560x1440 / 260Hz 1ms / NVIDIA G-Sync / AMD FreeSync / HDR 600
- 15db töltő egybe (65W + 90W) kerek végűek (ELKELT)
- Új! Targus - USB-C Dual HDMI 4K HUB - 2 HDMI-vel. Saját töltő nélkül 2 monitorral (120Hz)
Állásajánlatok
Cég: CAMERA-PRO Hungary Kft
Város: Budapest
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest