小编use*_*864的帖子

Arduino Wi-Fi屏蔽 - 无法发送UDP数据包

我正试图通过Wi-Fi网络将信息从arduino板发送到我的电脑.为了我的项目的目的,它必须是UDP连接我使用"发送和接收UDP字符串"示例(http://arduino.cc/en/Tutorial/WiFiSendReceiveUDPString),并进行一些更改:

#include <SPI.h>
#include <WiFi.h>
#include <WiFiUdp.h>

int status = WL_IDLE_STATUS;
char ssid[] = "itay_net"; //  your network SSID (name) 
char pass[] = "0527414540";    // your network password (use for WPA, or use as key for WEP)

unsigned int localPort = 50505;      // local port to listen on

IPAddress remote_ip(192, 168, 1, 100);
unsigned int remote_port = 50505;


char  ReplyBuffer[] = "acknowledged";       // a string to send back

WiFiUDP Udp;

void setup() {
  //Initialize serial and wait for …
Run Code Online (Sandbox Code Playgroud)

networking arduino

5
推荐指数
1
解决办法
2299
查看次数

标签 统计

arduino ×1

networking ×1