정보나눔

오픈소스하드웨어 프로젝트에 대한 다양한 정보를 나누는 공간입니다.

무드등 오류입니다
전창호 | 2015-11-04

WebClient:130: error: missing terminating " character
missing terminating " character
 

소스:

#define WEBSITE      "api.openweathermap.org"
#define WEBPAGE      "/data/2.5/weather?q=seoul&mode=xml&APPID=1632acd3a9f8d66d1be9ea8b7fd8dc9f""
 

프로필사진

전창호 2015-11-04 16:11:15

따옴표가 두개여서 하나지워서 성공은 했는데

Initializing...

Attempting to connect to chae
Connected!
Request DHCP

IP Addr: 172.20.10.3
Netmask: 255.255.255.240
Gateway: 172.20.10.1
DHCPsrv: 172.20.10.1
DNSserv: 172.20.10.1
api.openweathermap.org -> 128.199.103.33-------------------------------------
HTTP/1.1 200 OK
Server: nginx
Date: Wed, 04 Nov 2015 07:09:52 GMT
Content-Type: text/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
X-Source: redis
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, POST

2c9
<current><city id="1835848" name="Seoul"><coord lon="126.98" lat="37.57"></coord><country>KR</country><sun rise="2015-11-03T21:59:38" set="2015-11-04T08:31:07"></sun></city><temperature value="290.88" min="289.15" max="292.15" unit="kelvin"></temperature><humidity value="48" unit="%"></humidity><pressure value="1027" unit="hPa"></pressure><wind><speed value="1.5" name="Calm"></speed><gusts></gusts><direction value="230" code="SW" name="Southwest"></direction></wind><clouds value="1" name="clear sky"></clouds><visibility value="8000"></visibility><precipitation mode="no"></precipitation><weather number="721" value="haze" icon="50d"></weather><lastupdate value="2015-11-04T07:00:00"></lastupdate></current>

0

-------------------------------------


Disconnecting

 

이렇게뜨네요.

프로필사진

Klant 2015-11-04 16:41:38

안녕하세요!

<current><city id="1835848" name="Seoul"><coord lon="126.98" lat="37.57"></coord><country>KR</country><sun rise="2015-11-03T21:59:38" set="2015-11-04T08:31:07"></sun></city><temperature value="290.88" min="289.15" max="292.15" unit="kelvin"></temperature><humidity value="48" unit="%"></humidity><pressure value="1027" unit="hPa"></pressure><wind><speed value="1.5" name="Calm"></speed><gusts></gusts><direction value="230" code="SW" name="Southwest"></direction></wind><clouds value="1" name="clear sky"></clouds><visibility value="8000"></visibility><precipitation mode="no"></precipitation><weather number="721" value="haze" icon="50d"></weather><lastupdate value="2015-11-04T07:00:00"></lastupdate></current>

 

이 부분이 바로 날씨데이터입니다. 

cc3000라이브러리의 webclient 예제에서는 데이터를 한 번 받아온 후 클라이언트를 종료시키기 때문에 disconnecting이 출력되는 것이구요

잘 작동하네요 ;)

 

이전글   |    음주측정기 제작과정 중 문의 드립니다. 2015-11-04
다음글   |    dc모터 제어코드 질문 2015-11-05