## INO
###
-# For GNU/Linux
-ARDUINO_DIR := /usr/share/arduino/
-ARDMK_DIR := /usr/share/arduino/
-AVR_TOOLS_DIR := /usr
-
# For Seeeduino
BOARD_TAG := uno
AirQuality_Sensor \
DustSensor \
Humidity_Temperature_Sensor \
- LCD_Display9696 \
- RTC \
+ OLED_Display_96X96 \
+ RTC_DS1307 \
Wire
#Grove_Barometer_HP20x
+ #LCD_Display9696 \
-USER_LIB_PATH := $(realpath ./libraries)
+#USER_LIB_PATH := $(realpath ./libraries)
ifeq ($(NO_INO),)
include $(ARDMK_DIR)/Arduino.mk
--- /dev/null
+{
+ "nodes": {
+ "flake-utils": {
+ "locked": {
+ "lastModified": 1610051610,
+ "narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "narHash": "sha256-5KpQQpxDgan0g3+ynPBoZXujR2jUdAQSYIJdwl7j7pk=",
+ "path": "/nix/store/byb4g2xx02nklia8i7fdfxp3qrf8cp1q-nixpkgs-patched",
+ "type": "path"
+ },
+ "original": {
+ "id": "nixpkgs",
+ "type": "indirect"
+ }
+ },
+ "root": {
+ "inputs": {
+ "flake-utils": "flake-utils",
+ "nixpkgs": "nixpkgs"
+ }
+ }
+ },
+ "root": "root",
+ "version": 7
+}
--- /dev/null
+{
+inputs.nixpkgs.url = "flake:nixpkgs";
+inputs.flake-utils.url = "github:numtide/flake-utils";
+outputs = inputs:
+ inputs.flake-utils.lib.eachDefaultSystem (system:
+ let pkgs = inputs.nixpkgs.legacyPackages.${system}; in
+ {
+ devShell = import ./shell.nix { inherit inputs pkgs; };
+ }
+ );
+}
--- /dev/null
+Grove_Air_quality_Sensor
\ No newline at end of file
--- /dev/null
+Grove_Dust_Sensor
\ No newline at end of file
--- /dev/null
+Subproject commit 93f5ba4c0fa03a9193e5f4aca5cc9af957c08f9e
--- /dev/null
+Subproject commit c0d90940df1db6b3c53b8b5945aac4864d858003
--- /dev/null
+Subproject commit 4ff0e9ddae575a77b443a29ae74b889b4993209a
--- /dev/null
+Subproject commit f6df6d853728f2f04475861cfcc77ddd4b92213b
--- /dev/null
+Grove_Temperature_And_Humidity_Sensor
\ No newline at end of file
--- /dev/null
+Subproject commit ecacdd0ac918c7d0340ce338bafbf7f0dc0867bd
--- /dev/null
+Grove_High_Precision_RTC_PCF85063TP
\ No newline at end of file
/* Oled */
void setup_oled () {
- SeeedGrayOled.init();
+ //SeeedGrayOled.init(SH1107G);
+ SeeedGrayOled.init(SSD1327);
SeeedGrayOled.clearDisplay();
SeeedGrayOled.setNormalDisplay(); // Set display to normal mode (i.e non-inverse mode)
SeeedGrayOled.setVerticalMode();
SeeedGrayOled.setTextXY(2,0);
SeeedGrayOled.putString("T: ");
SeeedGrayOled.setTextXY(2,3);
- SeeedGrayOled.putFloat(t);
+ SeeedGrayOled.putNumber(t);
SeeedGrayOled.putString("*C");
}
SeeedGrayOled.setTextXY(3,0);
SeeedGrayOled.putString("H: ");
SeeedGrayOled.setTextXY(3,3);
- SeeedGrayOled.putFloat(h);
+ SeeedGrayOled.putNumber(h);
SeeedGrayOled.putString("%");
}
}
SeeedGrayOled.setTextXY(7,0);
SeeedGrayOled.putString("Feu: ");
SeeedGrayOled.setTextXY(7,5);
- //SeeedGrayOled.putFloat(mq9_ratio);
+ //SeeedGrayOled.putNumber(mq9_ratio);
//Serial.print(mq9_ratio);
- SeeedGrayOled.putFloat(mq9_R0_);
+ SeeedGrayOled.putNumber(mq9_R0_);
}
}
--- /dev/null
+{ inputs, pkgs, ... }:
+pkgs.mkShell {
+ name = "air-duino";
+ src = null;
+ #preferLocalBuild = true;
+ #allowSubstitutes = false;
+ buildInputs = with pkgs; [
+ arduino
+ arduino-core
+ arduino-mk
+ gcc
+ gcc-arm-embedded
+ avrdude
+ ];
+ #enableParallelBuilding = true;
+
+ ARDUINO = pkgs.arduino;
+ ARDUINO_PATH = pkgs.arduino-core;
+ ARDUINO_DIR = pkgs.arduino-core + "/share/arduino";
+ ARDMK_DIR = pkgs.arduino-mk;
+ AVR_TOOLS_DIR = pkgs.arduino + "/share/arduino/hardware/tools/avr";
+ USER_LIB_PATH = toString ./. + "/libraries";
+
+ #PATH="${pkgs.arduino + "/share/arduino/hardware/tools/avr/bin"}:$PATH"
+ shellHook = ''
+ '';
+}