Compare commits
7 Commits
docs/kicad
...
ef9040ffed
Author | SHA1 | Date | |
---|---|---|---|
ef9040ffed | |||
23651cb6d5 | |||
0037b1831a | |||
7b21441976 | |||
650290ab67 | |||
ef447b2dc7 | |||
830d40a777 |
@ -3,4 +3,6 @@
|
|||||||
|
|
||||||
## setup :
|
## setup :
|
||||||
|
|
||||||
rename `secrets.ini.example` to `secrets.ini`
|
renomé `secrets.ini.example` to `secrets.ini` et le remplir
|
||||||
|
|
||||||
|
compiler avec Platform.io
|
@ -45,7 +45,9 @@ build_flags =
|
|||||||
-D API_HOST=\"iot.epi.cb85.software\"
|
-D API_HOST=\"iot.epi.cb85.software\"
|
||||||
|
|
||||||
;---CAPTEUR FULL CONFIG---
|
;---CAPTEUR FULL CONFIG---
|
||||||
|
;valFull/valReset
|
||||||
-D ULTRA_SOUND_FULL=\"10\"
|
-D ULTRA_SOUND_FULL=\"5/10\"
|
||||||
|
;tempmin:tempmax/hummin:humax
|
||||||
-D DHT_FULL=\"20:30/60:80\"
|
-D DHT_FULL=\"20:30/60:80\"
|
||||||
|
;poid max
|
||||||
-D POID_FULL=\"100\"
|
-D POID_FULL=\"100\"
|
@ -41,7 +41,7 @@ class Balance{
|
|||||||
+ tar(val: int = 0): bool
|
+ tar(val: int = 0): bool
|
||||||
}
|
}
|
||||||
|
|
||||||
class Ultrason{
|
class HumiTemp{
|
||||||
- capteur: DHT*
|
- capteur: DHT*
|
||||||
+ HumiTemp(pin: int, type: String, fullVal: String)
|
+ HumiTemp(pin: int, type: String, fullVal: String)
|
||||||
+ read(): String
|
+ read(): String
|
||||||
@ -53,15 +53,26 @@ class Ultrason{
|
|||||||
+ read(): String
|
+ read(): String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class OledScreen{
|
||||||
|
- display: Adafruit_SSD1306*
|
||||||
|
+ OledScreen(screenWidth: int, screenHeight: int, oledResetPin: int = -1)
|
||||||
|
+ welcome(): void
|
||||||
|
+ clear(): void
|
||||||
|
+ wifiWaiting(): void
|
||||||
|
+ printVal(distance: String, poid: String, humitemp: String): void
|
||||||
|
}
|
||||||
|
|
||||||
Balance --|> Capteur
|
Balance --|> Capteur
|
||||||
Ultrason --|> Capteur
|
Ultrason --|> Capteur
|
||||||
HumiTemp --|> Capteur
|
HumiTemp --|> Capteur
|
||||||
|
|
||||||
|
|
||||||
API -> Program
|
|
||||||
Program <-- Balance
|
Program <-- Balance
|
||||||
Program <-- Ultrason
|
Program <-- Ultrason
|
||||||
Program <-- HumiTemp
|
Program <-- HumiTemp
|
||||||
|
|
||||||
|
Program <- API
|
||||||
|
|
||||||
|
OledScreen -> Program
|
||||||
|
|
||||||
@enduml
|
@enduml
|
@ -1 +0,0 @@
|
|||||||
/run/media/clement/Data/Mes_Docmument/Documents/Epitech/T-DEV-811/projet/project/IOT/docs/schéma/shéma poubelle/_autosave-shéma poubelle.kicad_sch
|
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -1,2 +0,0 @@
|
|||||||
(kicad_pcb (version 20221018) (generator pcbnew)
|
|
||||||
)
|
|
@ -1,77 +0,0 @@
|
|||||||
{
|
|
||||||
"board": {
|
|
||||||
"active_layer": 0,
|
|
||||||
"active_layer_preset": "",
|
|
||||||
"auto_track_width": true,
|
|
||||||
"hidden_netclasses": [],
|
|
||||||
"hidden_nets": [],
|
|
||||||
"high_contrast_mode": 0,
|
|
||||||
"net_color_mode": 1,
|
|
||||||
"opacity": {
|
|
||||||
"images": 0.6,
|
|
||||||
"pads": 1.0,
|
|
||||||
"tracks": 1.0,
|
|
||||||
"vias": 1.0,
|
|
||||||
"zones": 0.6
|
|
||||||
},
|
|
||||||
"selection_filter": {
|
|
||||||
"dimensions": true,
|
|
||||||
"footprints": true,
|
|
||||||
"graphics": true,
|
|
||||||
"keepouts": true,
|
|
||||||
"lockedItems": false,
|
|
||||||
"otherItems": true,
|
|
||||||
"pads": true,
|
|
||||||
"text": true,
|
|
||||||
"tracks": true,
|
|
||||||
"vias": true,
|
|
||||||
"zones": true
|
|
||||||
},
|
|
||||||
"visible_items": [
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
3,
|
|
||||||
4,
|
|
||||||
5,
|
|
||||||
8,
|
|
||||||
9,
|
|
||||||
10,
|
|
||||||
11,
|
|
||||||
12,
|
|
||||||
13,
|
|
||||||
15,
|
|
||||||
16,
|
|
||||||
17,
|
|
||||||
18,
|
|
||||||
19,
|
|
||||||
20,
|
|
||||||
21,
|
|
||||||
22,
|
|
||||||
23,
|
|
||||||
24,
|
|
||||||
25,
|
|
||||||
26,
|
|
||||||
27,
|
|
||||||
28,
|
|
||||||
29,
|
|
||||||
30,
|
|
||||||
32,
|
|
||||||
33,
|
|
||||||
34,
|
|
||||||
35,
|
|
||||||
36,
|
|
||||||
39,
|
|
||||||
40
|
|
||||||
],
|
|
||||||
"visible_layers": "fffffff_ffffffff",
|
|
||||||
"zone_display_mode": 0
|
|
||||||
},
|
|
||||||
"meta": {
|
|
||||||
"filename": "shéma poubelle.kicad_prl",
|
|
||||||
"version": 3
|
|
||||||
},
|
|
||||||
"project": {
|
|
||||||
"files": []
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,327 +0,0 @@
|
|||||||
{
|
|
||||||
"board": {
|
|
||||||
"3dviewports": [],
|
|
||||||
"design_settings": {
|
|
||||||
"defaults": {
|
|
||||||
"board_outline_line_width": 0.1,
|
|
||||||
"copper_line_width": 0.2,
|
|
||||||
"copper_text_size_h": 1.5,
|
|
||||||
"copper_text_size_v": 1.5,
|
|
||||||
"copper_text_thickness": 0.3,
|
|
||||||
"other_line_width": 0.15,
|
|
||||||
"silk_line_width": 0.15,
|
|
||||||
"silk_text_size_h": 1.0,
|
|
||||||
"silk_text_size_v": 1.0,
|
|
||||||
"silk_text_thickness": 0.15
|
|
||||||
},
|
|
||||||
"diff_pair_dimensions": [],
|
|
||||||
"drc_exclusions": [],
|
|
||||||
"rules": {
|
|
||||||
"min_copper_edge_clearance": 0.0,
|
|
||||||
"solder_mask_clearance": 0.0,
|
|
||||||
"solder_mask_min_width": 0.0
|
|
||||||
},
|
|
||||||
"track_widths": [],
|
|
||||||
"via_dimensions": []
|
|
||||||
},
|
|
||||||
"layer_presets": [],
|
|
||||||
"viewports": []
|
|
||||||
},
|
|
||||||
"boards": [],
|
|
||||||
"cvpcb": {
|
|
||||||
"equivalence_files": []
|
|
||||||
},
|
|
||||||
"erc": {
|
|
||||||
"erc_exclusions": [],
|
|
||||||
"meta": {
|
|
||||||
"version": 0
|
|
||||||
},
|
|
||||||
"pin_map": [
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
2,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
[
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
2,
|
|
||||||
1,
|
|
||||||
2,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
2,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
2,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
[
|
|
||||||
0,
|
|
||||||
2,
|
|
||||||
1,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
1,
|
|
||||||
0,
|
|
||||||
2,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
2
|
|
||||||
],
|
|
||||||
[
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2,
|
|
||||||
2
|
|
||||||
]
|
|
||||||
],
|
|
||||||
"rule_severities": {
|
|
||||||
"bus_definition_conflict": "error",
|
|
||||||
"bus_entry_needed": "error",
|
|
||||||
"bus_to_bus_conflict": "error",
|
|
||||||
"bus_to_net_conflict": "error",
|
|
||||||
"conflicting_netclasses": "error",
|
|
||||||
"different_unit_footprint": "error",
|
|
||||||
"different_unit_net": "error",
|
|
||||||
"duplicate_reference": "error",
|
|
||||||
"duplicate_sheet_names": "error",
|
|
||||||
"endpoint_off_grid": "warning",
|
|
||||||
"extra_units": "error",
|
|
||||||
"global_label_dangling": "warning",
|
|
||||||
"hier_label_mismatch": "error",
|
|
||||||
"label_dangling": "error",
|
|
||||||
"lib_symbol_issues": "warning",
|
|
||||||
"missing_bidi_pin": "warning",
|
|
||||||
"missing_input_pin": "warning",
|
|
||||||
"missing_power_pin": "error",
|
|
||||||
"missing_unit": "warning",
|
|
||||||
"multiple_net_names": "warning",
|
|
||||||
"net_not_bus_member": "warning",
|
|
||||||
"no_connect_connected": "warning",
|
|
||||||
"no_connect_dangling": "warning",
|
|
||||||
"pin_not_connected": "error",
|
|
||||||
"pin_not_driven": "error",
|
|
||||||
"pin_to_pin": "warning",
|
|
||||||
"power_pin_not_driven": "error",
|
|
||||||
"similar_labels": "warning",
|
|
||||||
"simulation_model_issue": "ignore",
|
|
||||||
"unannotated": "error",
|
|
||||||
"unit_value_mismatch": "error",
|
|
||||||
"unresolved_variable": "error",
|
|
||||||
"wire_dangling": "error"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"libraries": {
|
|
||||||
"pinned_footprint_libs": [],
|
|
||||||
"pinned_symbol_libs": []
|
|
||||||
},
|
|
||||||
"meta": {
|
|
||||||
"filename": "shéma poubelle.kicad_pro",
|
|
||||||
"version": 1
|
|
||||||
},
|
|
||||||
"net_settings": {
|
|
||||||
"classes": [
|
|
||||||
{
|
|
||||||
"bus_width": 12,
|
|
||||||
"clearance": 0.2,
|
|
||||||
"diff_pair_gap": 0.25,
|
|
||||||
"diff_pair_via_gap": 0.25,
|
|
||||||
"diff_pair_width": 0.2,
|
|
||||||
"line_style": 0,
|
|
||||||
"microvia_diameter": 0.3,
|
|
||||||
"microvia_drill": 0.1,
|
|
||||||
"name": "Default",
|
|
||||||
"pcb_color": "rgba(0, 0, 0, 0.000)",
|
|
||||||
"schematic_color": "rgba(0, 0, 0, 0.000)",
|
|
||||||
"track_width": 0.25,
|
|
||||||
"via_diameter": 0.8,
|
|
||||||
"via_drill": 0.4,
|
|
||||||
"wire_width": 6
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"meta": {
|
|
||||||
"version": 3
|
|
||||||
},
|
|
||||||
"net_colors": null,
|
|
||||||
"netclass_assignments": null,
|
|
||||||
"netclass_patterns": []
|
|
||||||
},
|
|
||||||
"pcbnew": {
|
|
||||||
"last_paths": {
|
|
||||||
"gencad": "",
|
|
||||||
"idf": "",
|
|
||||||
"netlist": "",
|
|
||||||
"specctra_dsn": "",
|
|
||||||
"step": "",
|
|
||||||
"vrml": ""
|
|
||||||
},
|
|
||||||
"page_layout_descr_file": ""
|
|
||||||
},
|
|
||||||
"schematic": {
|
|
||||||
"annotate_start_num": 0,
|
|
||||||
"drawing": {
|
|
||||||
"dashed_lines_dash_length_ratio": 12.0,
|
|
||||||
"dashed_lines_gap_length_ratio": 3.0,
|
|
||||||
"default_line_thickness": 6.0,
|
|
||||||
"default_text_size": 50.0,
|
|
||||||
"field_names": [],
|
|
||||||
"intersheets_ref_own_page": false,
|
|
||||||
"intersheets_ref_prefix": "",
|
|
||||||
"intersheets_ref_short": false,
|
|
||||||
"intersheets_ref_show": false,
|
|
||||||
"intersheets_ref_suffix": "",
|
|
||||||
"junction_size_choice": 3,
|
|
||||||
"label_size_ratio": 0.375,
|
|
||||||
"pin_symbol_size": 25.0,
|
|
||||||
"text_offset_ratio": 0.15
|
|
||||||
},
|
|
||||||
"legacy_lib_dir": "",
|
|
||||||
"legacy_lib_list": [],
|
|
||||||
"meta": {
|
|
||||||
"version": 1
|
|
||||||
},
|
|
||||||
"net_format_name": "",
|
|
||||||
"page_layout_descr_file": "",
|
|
||||||
"plot_directory": "",
|
|
||||||
"spice_current_sheet_as_root": false,
|
|
||||||
"spice_external_command": "spice \"%I\"",
|
|
||||||
"spice_model_current_sheet_as_root": true,
|
|
||||||
"spice_save_all_currents": false,
|
|
||||||
"spice_save_all_voltages": false,
|
|
||||||
"subpart_first_id": 65,
|
|
||||||
"subpart_id_separator": 0
|
|
||||||
},
|
|
||||||
"sheets": [],
|
|
||||||
"text_variables": {}
|
|
||||||
}
|
|
@ -1,5 +0,0 @@
|
|||||||
(kicad_sch (version 20230121) (generator eeschema)
|
|
||||||
(paper "A4")
|
|
||||||
(lib_symbols)
|
|
||||||
(symbol_instances)
|
|
||||||
)
|
|
@ -1,20 +0,0 @@
|
|||||||
EESchema-LIBRARY Version 2.3
|
|
||||||
#encoding utf-8
|
|
||||||
#
|
|
||||||
# HC-SR04
|
|
||||||
#
|
|
||||||
DEF HC-SR04 U 0 40 Y Y 1 F N
|
|
||||||
F0 "U" -250 -300 60 H V C CNN
|
|
||||||
F1 "HC-SR04" -100 300 60 H V C CNN
|
|
||||||
F2 "" 0 0 60 H V C CNN
|
|
||||||
F3 "" 0 0 60 H V C CNN
|
|
||||||
DRAW
|
|
||||||
S 0 250 -300 -250 0 1 0 N
|
|
||||||
X VCC 1 200 150 200 L 50 50 1 1 I
|
|
||||||
X TRIG 2 200 50 200 L 50 50 1 1 I
|
|
||||||
X ECHO 3 200 -50 200 L 50 50 1 1 I
|
|
||||||
X GND 4 200 -150 200 L 50 50 1 1 I
|
|
||||||
ENDDRAW
|
|
||||||
ENDDEF
|
|
||||||
#
|
|
||||||
#End Library
|
|
@ -49,8 +49,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool connect();
|
bool connect();
|
||||||
|
|
||||||
//TODO :: Check wifibegin avant
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
||||||
@ -89,7 +87,11 @@ private:
|
|||||||
*/
|
*/
|
||||||
String token;
|
String token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief wifi démmaré
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
bool init;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -8,15 +8,16 @@ API::API(String user, String password, String host, bool https){
|
|||||||
this->https = https;
|
this->https = https;
|
||||||
this->token = "";
|
this->token = "";
|
||||||
this->client = new WiFiEspClient();
|
this->client = new WiFiEspClient();
|
||||||
|
this->init = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool API::wifiBegin(String wifiId, String wifiPass, Stream* espSerial){
|
bool API::wifiBegin(String wifiId, String wifiPass, Stream* espSerial){
|
||||||
WiFi.init(espSerial);
|
WiFi.init(espSerial);
|
||||||
|
this->init = true;
|
||||||
|
|
||||||
// check for the presence of the shield
|
// check for the presence of the shield
|
||||||
if (WiFi.status() == WL_NO_SHIELD) {
|
if (WiFi.status() == WL_NO_SHIELD) {
|
||||||
Serial.println("WiFi shield not present"); // FIXME: rm debug
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,6 +29,7 @@ bool API::wifiBegin(String wifiId, String wifiPass, Stream* espSerial){
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
bool API::connect(){
|
bool API::connect(){
|
||||||
|
if(!this->init)return false;
|
||||||
this->client->stop();
|
this->client->stop();
|
||||||
bool sortie = false;
|
bool sortie = false;
|
||||||
|
|
||||||
@ -119,6 +121,5 @@ bool API::sendValue(String val, String poubelleID, String valUnit, bool full){
|
|||||||
this->client->println("Connection: close");
|
this->client->println("Connection: close");
|
||||||
this->client->println();
|
this->client->println();
|
||||||
|
|
||||||
this->token = "";//XXX: on rm le token a chaque fois car on sais pas si la requet a bien aboutie et donc si il y est encore bon
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
@ -11,8 +11,16 @@ String HumiTemp::read(){
|
|||||||
int hum = this->capteur->readHumidity(true);
|
int hum = this->capteur->readHumidity(true);
|
||||||
int temp = this->capteur->readTemperature(false,true);
|
int temp = this->capteur->readTemperature(false,true);
|
||||||
|
|
||||||
|
String stemp = this->fullVall.substring(0, this->fullVall.indexOf("/"));
|
||||||
|
String shum = this->fullVall.substring(this->fullVall.indexOf("/")+1, this->fullVall.length());
|
||||||
|
|
||||||
|
int mintemp = stemp.substring(0, stemp.indexOf(":")).toInt();
|
||||||
|
int maxtemp = stemp.substring(stemp.indexOf(":")+1, stemp.length()).toInt();
|
||||||
|
int minhum = shum.substring(0, shum.indexOf(":")).toInt();
|
||||||
|
int maxhum = shum.substring(shum.indexOf(":")+1, shum.length()).toInt();
|
||||||
|
|
||||||
//valeur pour un élevage d'astico de pèche selon chatGPT
|
//valeur pour un élevage d'astico de pèche selon chatGPT
|
||||||
if((temp > 20 && temp < 30) && (hum > 60 && hum < 80)){//TODO: passer les valeurs en config
|
if((temp > mintemp && temp < maxtemp) && (hum > minhum && hum < maxhum)){
|
||||||
this->full = true;
|
this->full = true;
|
||||||
}else{
|
}else{
|
||||||
this->full = false;
|
this->full = false;
|
||||||
|
@ -9,11 +9,11 @@ Ultrason::Ultrason(int trigeur, int echo, String fullVall):
|
|||||||
|
|
||||||
String Ultrason::read(){
|
String Ultrason::read(){
|
||||||
int sortie = this->capteur->read();
|
int sortie = this->capteur->read();
|
||||||
if (sortie < this->fullVall.toInt())
|
if (sortie < this->fullVall.substring(0, this->fullVall.indexOf("/")).toInt())
|
||||||
{
|
{
|
||||||
this->full = true;
|
this->full = true;
|
||||||
}else{
|
}else if (sortie > this->fullVall.substring(this->fullVall.indexOf("/")+1, this->fullVall.length()).toInt()){
|
||||||
this->full = false;
|
this->full = false;
|
||||||
}
|
}
|
||||||
return String(sortie);
|
return String(sortie);
|
||||||
}//TODO: faire en sorte que full se reset avec une autre val
|
}
|
@ -21,13 +21,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
void welcome();
|
void welcome();
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief print the total amount on the screen
|
|
||||||
*
|
|
||||||
* @param amount The total amount to print in centimes
|
|
||||||
*/
|
|
||||||
void printAmount(int amount);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Clear the screen
|
* @brief Clear the screen
|
||||||
|
@ -40,26 +40,6 @@ void OledScreen::printVal(String distance, String poid, String humitemp){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void OledScreen::printAmount(int amount) {
|
|
||||||
this->display->clearDisplay();
|
|
||||||
this->display->setCursor(0, 0);
|
|
||||||
this->display->setTextSize(2);
|
|
||||||
this->display->setTextColor(WHITE);
|
|
||||||
this->display->println(F(" Total: "));
|
|
||||||
this->display->println();
|
|
||||||
|
|
||||||
this->display->print(amount / 100);
|
|
||||||
this->display->print(F(","));
|
|
||||||
int centimes = amount % 100;
|
|
||||||
if (centimes < 10) {
|
|
||||||
this->display->print(F("0"));
|
|
||||||
}
|
|
||||||
this->display->println(centimes);
|
|
||||||
this->display->print(F(" EUR"));
|
|
||||||
this->display->display();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void OledScreen::wifiWaiting() {
|
void OledScreen::wifiWaiting() {
|
||||||
this->clear();
|
this->clear();
|
||||||
this->display->setCursor(0, 0);
|
this->display->setCursor(0, 0);
|
||||||
|
@ -33,18 +33,16 @@ void Program::loop(){
|
|||||||
this->screen->printVal(distance, poid, humitemp);
|
this->screen->printVal(distance, poid, humitemp);
|
||||||
|
|
||||||
this->api->sendValue(distance, TRASHCAN_ONE, this->ultrasonic->getValType(), this->ultrasonic->isFull());
|
this->api->sendValue(distance, TRASHCAN_ONE, this->ultrasonic->getValType(), this->ultrasonic->isFull());
|
||||||
Serial.print("Distance in CM = " + distance);
|
|
||||||
Serial.println(this->ultrasonic->isFull()?" true":" false");
|
Serial.println(this->ultrasonic->isFull()?" true":" false");
|
||||||
|
|
||||||
|
Serial.println("humiTemp = " + humitemp);
|
||||||
this->api->sendValue(humitemp, TRASHCAN_TWO, this->dht->getValType(), this->dht->isFull());
|
this->api->sendValue(humitemp, TRASHCAN_TWO, this->dht->getValType(), this->dht->isFull());
|
||||||
Serial.print("humiTemp = " + humitemp);
|
|
||||||
Serial.println(this->dht->isFull()?" true":" false");
|
Serial.println(this->dht->isFull()?" true":" false");
|
||||||
|
|
||||||
|
Serial.println("poid = " + poid);
|
||||||
this->api->sendValue(poid, TRASHCAN_THREE, this->balance->getValType(), this->balance->isFull());
|
this->api->sendValue(poid, TRASHCAN_THREE, this->balance->getValType(), this->balance->isFull());
|
||||||
Serial.print("poid = " + poid);
|
|
||||||
Serial.println(this->balance->isFull()?" true":" false");
|
Serial.println(this->balance->isFull()?" true":" false");
|
||||||
|
|
||||||
Serial.println();
|
Serial.println();
|
||||||
|
|
||||||
delay(1000);
|
|
||||||
}
|
}
|
10
README.md
10
README.md
@ -1,12 +1,10 @@
|
|||||||
# Depot IOT VR
|
# Depot IOT VR
|
||||||
|
|
||||||
Lien du Gitea : (depot principale + gestion de projet)
|
Lien du Gitea : (depot principale + gestion de projet)
|
||||||
https://gitea.cb85.software/Epitech-T-DEV-811/T-DEV-811
|
https://git.lab-ouest.org/Epitech-T-DEV-811/T-DEV-811
|
||||||
|
|
||||||
|
|
||||||
Lien de la CAO : https://cad.onshape.com/documents/d370ee863400195afb23d026/w/1a94981b6a6f71d70b075e30/e/d0feb75fc5a122c54598349b?renderMode=0&uiState=6422993bab4d903a51186392
|
Lien de la CAO : https://cad.onshape.com/documents/d370ee863400195afb23d026/w/1a94981b6a6f71d70b075e30/e/d0feb75fc5a122c54598349b?renderMode=0&uiState=6422993bab4d903a51186392
|
||||||
|
|
||||||
|
|
||||||
### Mobile/Unity
|
### Mobile/Unity
|
||||||
|
|
||||||
Pour gérer l'AR, nous avons décider d'utiliser Unity et pour résoudre le souci de multi target en AR, nous avons utilisé Vuforia.
|
Pour gérer l'AR, nous avons décider d'utiliser Unity et pour résoudre le souci de multi target en AR, nous avons utilisé Vuforia.
|
||||||
@ -21,7 +19,7 @@ coté IoT, les valeurs de chaque capteurs sont envoyé à l'API puis ensuite, l'
|
|||||||
le champ 'unit' dans la collection trash correspond au type de capteur que l'IoT va envoyer a l'api. Le mapping suivant a été conventionner:
|
le champ 'unit' dans la collection trash correspond au type de capteur que l'IoT va envoyer a l'api. Le mapping suivant a été conventionner:
|
||||||
|
|
||||||
| Capteur | Unit | Valeur |
|
| Capteur | Unit | Valeur |
|
||||||
|----------------------|:----:|--------------------------------------|
|
| -------------------- |:----:| ------------------------------------ |
|
||||||
| Temperature/Humidité | T/H | 10.0;50 (10 degré et 50% d'humidité) |
|
| Temperature/Humidité | T/H | 10.0;50 (10 degré et 50% d'humidité) |
|
||||||
| Poids | W | 200 (200 gram) |
|
| Poids | W | 200 (200 gram) |
|
||||||
| Distance | D | 40 (40 cm) |
|
| Distance | D | 40 (40 cm) |
|
Reference in New Issue
Block a user