OnionIoT / Onion-Docs

Documentation for all things Onion
https://docs.onion.io
GNU General Public License v3.0
112 stars 65 forks source link

syntax error: unexpected "(" (expecting ")") #42

Closed felipecespedes closed 6 years ago

felipecespedes commented 7 years ago

Hi, I'm trying to get data of a DHT22 sensor in Omega2, but am getting the following error:

line 1: syntax error: unexpected "(" (expecting ")")

Any ideas about it? Thanks.

greenbreakfast commented 7 years ago

hi, which guide are you using?

felipecespedes commented 7 years ago

This one https://github.com/OnionIoT/Onion-Docs/blob/master/Omega2/Projects/PHP-DHT11-DHT22-Sensor-Examples.md

felipecespedes commented 7 years ago

Hi, seems that checkHumidity binaries you guys provided are for the Omega1, where can I find binaries for the Omega2?

DanOBrien commented 7 years ago

I'm getting the same message:

root@onion1:~/checkHumidity/bin# ./checkHumidity 1 DHT11 ./checkHumidity: line 1: syntax error: unexpected "(" (expecting ")")

I'm using this hardware: Codename: Ando Model: Onion Omega2+ Revision: R1 Firmware: 0.1.10 (b160)

The page: https://wiki.onion.io/Tutorials/PHP-DHT11-DHT22-Sensor-Examples and https://github.com/OnionIoT/Onion-Docs/blob/master/Omega2/Projects/PHP-DHT11-DHT22-Sensor-Examples.md seem to be the same thing, but not valid for Omega2.

mdoary commented 7 years ago

Anyone get this working? All i have found is broken Dropbox links.

h0l0gram commented 6 years ago

@DanOBrien @viwell For the Omega2(+) adapted sources see https://github.com/h0l0gram/omega2-checkHumidity. There is even a compiled binary for firmware 0.1.10 b160 available.

greenbreakfast commented 6 years ago

We've rolled the DHT sensor code into our package repo, for more details see: https://onion.io/2bt-reading-dht-sensor-data/