No ACL setup yet! Denying access to everyone.
en:edu:zmitac:macro:embedeed:lab:esp
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:edu:zmitac:macro:embedeed:lab:esp [2021/02/28 16:37] – pczekalski | en:edu:zmitac:macro:embedeed:lab:esp [2021/12/21 14:33] (current) – [Connecting to the nodes] pczekalski | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| <note important> | <note important> | ||
| - | <note important> | + | |
| ==== Actuators ==== | ==== Actuators ==== | ||
| Line 29: | Line 29: | ||
| ==== Sensors ==== | ==== Sensors ==== | ||
| In the following scenarios, you will use a DHT, integrated temperature-humidity sensor. \\ | In the following scenarios, you will use a DHT, integrated temperature-humidity sensor. \\ | ||
| - | Sensor types vary between nodes (Figure {{ref> | ||
| - | * Nodes 1 through 4 all use DHT 22 (white sensor); | ||
| - | * Nodes 8 through 11 all use DHT 11 (a blue one); | ||
| <figure dhtsensors> | <figure dhtsensors> | ||
| Line 38: | Line 35: | ||
| </ | </ | ||
| - | All of our laboratory nodes use DHT11 sensors. \\ In general, DHT11 and DHT22 sensors differ with accuracy; thus for raw experimentation, | + | All of our laboratory nodes use DHT11 sensors(blue one on the Figure {{ref> |
| Regarding DHTs, all nodes share the same configuration on the connection level: your DHT is always connected to the D4/GPIO2 pin of the ESP microcontroller. | Regarding DHTs, all nodes share the same configuration on the connection level: your DHT is always connected to the D4/GPIO2 pin of the ESP microcontroller. | ||
| Line 49: | Line 46: | ||
| Please follow instructions and remember to fix your theme for Revolution! Your environment should look like in Figure {{ref> | Please follow instructions and remember to fix your theme for Revolution! Your environment should look like in Figure {{ref> | ||
| - | __**Do not book a device for more than 30 minutes in a row (Figure {{ref> | + | __**Do not book a device for more than 30 minutes in a row (Figure {{ref> |
| + | You can continue working with devices out of regular working hours, see the supervisor' | ||
| The URL for accessing the VREL lab is: [[http:// | The URL for accessing the VREL lab is: [[http:// | ||
| Line 95: | Line 93: | ||
| board = d1_mini | board = d1_mini | ||
| framework = arduino | framework = arduino | ||
| - | lib_deps = Wire, 1574, PubSubClient, | + | lib_ldf_mode = deep+ |
| + | lib_deps = Wire, 1574, PubSubClient, | ||
| </ | </ | ||
| Obviously, this contains all hardware and software libraries, even more than is necessary to use in case of the following two scenarios, but you will have it ready for future experimentation. | Obviously, this contains all hardware and software libraries, even more than is necessary to use in case of the following two scenarios, but you will have it ready for future experimentation. | ||
| Line 302: | Line 301: | ||
| Observe temperature and humidity readings on the LCD. The temperature in our lab usually ranges between 20-30C (not, we observed over 30C during really hot summer!) while humidity is usually between 35-60%Rh. | Observe temperature and humidity readings on the LCD. The temperature in our lab usually ranges between 20-30C (not, we observed over 30C during really hot summer!) while humidity is usually between 35-60%Rh. | ||
| + | ===== FAQ ===== | ||
| + | **Q: Help, my LCD seems to be frozen!**\\ | ||
| + | A1: Check the I2C address is correct, regarding the laboratory node you're using. Consult details in the hardware section, as above.\\ | ||
| + | A2: Still not working? And you're sure the I2C address is correct so ... It is rare, but may happen that the I2C bus becomes in an inconsistent state. In such case run the following program (in the separate source file, eventually merge with your code): | ||
| + | <code c> | ||
| + | #include < | ||
| + | #include < | ||
| + | LiquidCrystal_I2C lcd(0x3F, | ||
| + | |||
| + | void setup() | ||
| + | { | ||
| + | pinMode(4, | ||
| + | pinMode(5, OUTPUT); | ||
| + | digitalWrite(4, | ||
| + | digitalWrite(5, | ||
| + | delay(2000); | ||
| + | pinMode(5, INPUT); // reset pin | ||
| + | pinMode(4, INPUT); | ||
| + | delay(50); | ||
| + | delay(2000); | ||
| + | lcd.init(D2, | ||
| + | lcd.backlight(); | ||
| + | lcd.home(); | ||
| + | lcd.print(" | ||
| + | } | ||
| + | |||
| + | void loop() | ||
| + | { | ||
| + | |||
| + | } | ||
| + | </ | ||
en/edu/zmitac/macro/embedeed/lab/esp.1614526635.txt.gz · Last modified: by pczekalski
