Re: Подсветка чайника с меняющимся цветом в зависимости от t
Добавлено: Пн авг 24, 2015 05:20:14
Андрей Огромное Вам СПАСИБО!!!
Проверил на макете все работает прекрасно!!
Проверил на макете все работает прекрасно!!
Здесь можно немножко помяукать :)
https://radiokot.ru/forum/
По поводу подсветки - на мой взгляд ступенчатая практичнее для пользователя (только цвета должны быть удобны не для программиста, а для пользователя) - почему? Потому что опознать человеку неизвестный цвет обычно трудно. Тем более мгновенно оценить по нему степень нагрева.
Должно быть на первое время 3 ступени - синий, жёлтый (от 45 градусов), красный (кипяток).
Я ещё после написания поста подумал, что моя градация укладывается в степени ожоговKarl2233 писал(а):синий - до 40С, желтый(зелёный) - от 40 до 70, красный - от 70, звук - от 90.
таким образом, можно RGB применить и по цветам вроде всё легко узнаваемо и с таким разбросом температуры можно датчик ставить на корпус.
Код: Выделить всё
with
AVR,
AVR.MCU,
AVR.Wait,
Interfaces,
One_Wire;
use AVR, AVR.MCU,Interfaces;
procedure Main is
RED_pin: constant := 0;
GREEN_pin: constant := 2;
BLUE_pin: constant := 1;
BEEP_pin: constant := 3;
RED: boolean renames PORTB_Bits(RED_pin);
GREEN: boolean renames PORTB_Bits(GREEN_pin);
BLUE: boolean renames PORTB_Bits(BLUE_pin);
BEEP: boolean renames PORTB_Bits(BEEP_pin);
low_byte, high_byte, t: Unsigned_8 := 0;
procedure Wait_ms is
new AVR.Wait.Generic_Busy_Wait_Milliseconds(Crystal_hertz => 1_200_000);
begin
RED := low;
GREEN := low;
BLUE := low;
BEEP := low;
DDRB_Bits := (0..3 => DD_Output, others => DD_Input);
loop
if One_wire.Reset then
One_Wire.Send_command(16#CC#);
One_Wire.Send_command(16#44#);
end if;
Wait_ms(1000);
if One_wire.Reset then
One_Wire.Send_command(16#CC#);
One_Wire.Send_command(16#BE#);
low_byte := One_wire.Get;
high_byte := One_wire.Get;
end if;
high_byte := shift_left(high_byte,4) and 2#0111_0000#;
low_byte := shift_right(low_byte,4) and 2#0000_1111#;
t := high_byte or low_byte;
case t is
when 1..30 => red := false; green := false; blue := true; beep := false;
when 31..50 => red := false; green := true; blue := false; beep := false;
when 51..70 => red := true; green := true; blue := false; beep := false;
when 71..95 => red := true; green := false; blue := false; beep := false;
when 96..110 => PINB_Bits(RED_pin) := true; green := false; blue := false; PINB_Bits(BEEP_pin) := true;
when others => red := true; green := true; blue := true; beep := true;
end case;
end loop;
end Main;Код: Выделить всё
---------------------------------------------------------------------------
-- The AVR-Ada Library is free software; you can redistribute it and/or --
-- modify it under terms of the GNU General Public License as published --
-- by the Free Software Foundation; either version 2, or (at your --
-- option) any later version. The AVR-Ada Library is distributed in the --
-- hope that it will be useful, but WITHOUT ANY WARRANTY; without even --
-- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR --
-- PURPOSE. See the GNU General Public License for more details. --
-- --
-- As a special exception, if other files instantiate generics from this --
-- unit, or you link this unit with other files to produce an --
-- executable this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
---------------------------------------------------------------------------
with AVR; use AVR;
with AVR.MCU;
package One_Wire.AVR_Wiring is
pragma Preelaborate;
OW_Line : constant AVR.Bit_Number := 4;
OW_DD : Boolean renames MCU.DDRB_Bits (OW_Line);
OW_Out : Boolean renames MCU.PortB_Bits (OW_Line);
OW_In : Boolean renames MCU.PinB_Bits (OW_Line);
end One_Wire.AVR_Wiring;
Код: Выделить всё
###########################################################################
## The AVR-Ada Library is free software; you can redistribute it and/or ##
## modify it under terms of the GNU General Public License as published ##
## by the Free Software Foundation; either version 2, or (at your ##
## option) any later version. The AVR#Ada Library is distributed in the ##
## hope that it will be useful, but WITHOUT ANY WARRANTY; without even ##
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ##
## PURPOSE. See the GNU General Public License for more details. ##
###########################################################################
# This makefile is adapted from the sample Makefile of WinAVR by Eric
# B. Wedington, Jцrg Wunsch and others. As they released it to the
# Public Domain, I could pretend that I wrote it myself. Honestly, I
# removed many (probably useful) parts to better fit the GNAT project makes.
#
# On command line:
#
# make all = Make software.
#
# make clean = Clean out built project files.
#
# make file.prog = Upload the hex file to the device, using avrdude.
# Please customize the avrdude settings below first!
#
# make filename.s = Just compile filename.adb into the assembler code only.
#
#
# To rebuild project do "make clean" then "make all".
#----------------------------------------------------------------------------
-include $(Makefile_pre)
# MCU name
MCU := attiny13
# GNAT project file
GPR := build.gpr
# put the names of the target files here (without extension)
ADA_TARGETS := main
#---------------- GNATMAKE Options ----------------
MFLAGS = -XMCU=$(MCU) -p -P$(GPR)
# -p : Create missing obj, lib and exec dirs
#---------------- Programming Options (avrdude) ----------------
# Output format. (can be srec, ihex, binary)
FORMAT = ihex
#---------------- Programming Options (avrdude) ----------------
# Programming hardware: alf avr910 avrisp bascom bsd
# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
#
# Type: avrdude -c ?
# to get a full listing.
#
AVRDUDE_PROGRAMMER = ftbb
# com1 = serial port.
# programmer connected to serial device, add -b 57600 for Arduinos
AVRDUDE_PORT = ft0 -B 19200
AVRDUDE_WRITE_FLASH = -U flash:w:
AVRDUDE_WRITE_EEPROM = -U eeprom:w:
AVRDUDE_READ_LFUSE = -U lfuse:r:lfuse.hex:i
AVRDUDE_READ_HFUSE = -U hfuse:r:hfuse.hex:i
AVRDUDE_READ_EFUSE = -U efuse:r:efuse.hex:i
AVRDUDE_WRITE_LFUSE = -U lfuse:w:lfuse.hex:i
AVRDUDE_WRITE_HFUSE = -U hfuse:w:hfuse.hex:i
AVRDUDE_WRITE_EFUSE = -U efuse:w:efuse.hex:i
# Uncomment the following if you want avrdude's erase cycle counter.
# Note that this counter needs to be initialized first using -Yn,
# see avrdude manual.
#AVRDUDE_ERASE_COUNTER = -y
# Uncomment the following if you do /not/ wish a verification to be
# performed after programming the device.
#AVRDUDE_NO_VERIFY = -V
# Increase verbosity level. Please use this when submitting bug
# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude>
# to submit bug reports.
#AVRDUDE_VERBOSE = -v -v
AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
#======================
# Define programs and commands.
SHELL := sh
CC := avr-gcc
OBJCOPY := avr-objcopy
OBJDUMP := avr-objdump
SIZE := avr-size
NM := avr-nm
AVRDUDE := C:\program files\ftbb\avrdude
REMOVE := rm -f
COPY := cp
RENAME := mv
WINSHELL := cmd
GNATMAKE := avr-gnatmake
RESET_FTBB := C:\Ada_Projects\release_reset_on_ftbb\release_reset_ftbb.exe
# Combine all necessary flags and optional flags.
# Add target processor to flags.
ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
# Default target.
all: build
ADA_TARGETS_ELF = $(addsuffix .elf, $(ADA_TARGETS))
ADA_TARGETS_HEX = $(addsuffix .hex, $(ADA_TARGETS))
ADA_TARGETS_EEP = $(addsuffix .eep, $(ADA_TARGETS))
ADA_TARGETS_LSS = $(addsuffix .lss, $(ADA_TARGETS))
ADA_TARGETS_SYM = $(addsuffix .sym, $(ADA_TARGETS))
ADA_TARGETS_SIZE = $(addsuffix .size, $(ADA_TARGETS))
# Create the necessary sub-directories
SUBDIRS := obj lcdobj lcdlib
build: $(ADA_TARGETS_ELF) $(ADA_TARGETS_HEX) $(ADA_TARGETS_EEP) \
$(ADA_TARGETS_LSS) $(ADA_TARGETS_SYM) $(ADA_TARGETS_SIZE)
%.size: %.elf FORCE
$(SIZE) --format=avr --mcu=$(MCU) $<
# Program the device.
%.prog: %.hex %.eep
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)$*.hex
# $(AVRDUDE_WRITE_EEPROM)
# Create final output files (.hex, .eep) from ELF output file.
%.hex: %.elf
$(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
%.eep: %.elf
-$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O $(FORMAT) $< $@
# Create extended listing file from ELF output file.
%.lss: %.elf
$(OBJDUMP) -h -S $< > $@
# Create a symbol table from ELF output file.
%.sym: %.elf
$(NM) -n $< > $@
# --- build and link using gnatmake, force rebuilding by gnatmake to
# make sure dependencies are resolved
%.elf: $(GPR) $(SUBDIRS) FORCE
$(GNATMAKE) $(MFLAGS) -XAVRADA_MAIN=$*
# Compile: create assembler files from Ada source files.
%.s : %.adb
$(GNATMAKE) -f -u $(MFLAGS) $< -cargs -S
%.s : %.ads
$(GNATMAKE) -f -u $(MFLAGS) $< -cargs -S
# Assemble: create object files from assembler source files.
%.o : %.S
@echo
@echo $(MSG_ASSEMBLING) $<
$(CC) -c $(ALL_ASFLAGS) $< -o $@
# create the subdirectories
$(SUBDIRS):
$(REMOVE) -r $@
mkdir $@
# Target: clean project.
clean: clean_gnat clean_list
clean_gnat:
avr-gnatclean -XMCU=$(MCU) -P$(GPR)
clean_gnat_recursive:
avr-gnatclean -r -XMCU=$(MCU) -P$(GPR)
clean_list :
$(REMOVE) *.hex
$(REMOVE) *.eep
$(REMOVE) *.elf
$(REMOVE) *.map
$(REMOVE) *.sym
$(REMOVE) *.lss
$(REMOVE) *.ali
$(REMOVE) b~*.ad?
$(REMOVE) -rf $(SUBDIRS)
program:
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)main.hex
$(RESET_FTBB) FT232R\ USB\ UART
read_fuses:
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_READ_LFUSE)
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_READ_HFUSE)
# $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_READ_EFUSE)
write_fuses:
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_HFUSE)
$(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_LFUSE)
# $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_EFUSE)
run: all program
FORCE:
# Listing of phony targets.
.PHONY : all finish \
build elf hex eep lss sym clean clean_list program
-include $(Makefile_post)
Код: Выделить всё
---------------------------------------------------------------------------
-- The AVR-Ada Library is free software; you can redistribute it and/or --
-- modify it under terms of the GNU General Public License as published --
-- by the Free Software Foundation; either version 2, or (at your --
-- option) any later version. The AVR-Ada Library is distributed in the --
-- hope that it will be useful, but WITHOUT ANY WARRANTY; without even --
-- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR --
-- PURPOSE. See the GNU General Public License for more details. --
---------------------------------------------------------------------------
project Build extends "avr_app" is
for Object_Dir use "obj";
for Exec_Dir use ".";
for Source_Dirs use (".");
end Build;
А кому нужна вообще точная температура воды в чайнике? Ну будет +-5 градусов - чтобы ошпарится будет достаточно любой температуры, но с разным временем, пока не сработает болевой порог. Так что калибровать ничего не нужно.Андрей СШ писал(а):Про расположение датчика снаружи думал и пришёл к выводу, что нужна специальная процедура калибровки, Сделать можно но настройка муторной станет. Именно поэтому и предпочитаю просто градиент от синего к красному. Такая индикация в отличие от ступенчатой не требует точной калибровки.
Пластик не охота макать в кипяток.Karl2233 писал(а):у DS в пластике температура до 125, вроде на 25% выше необходимого, а с учётом того что корпус нагревается явно ниже 100С то с лихвой хватит.
Я всё это время думал что речь идёт о электрочайнике с автоматом выключения. А тут эвона как...Karl2233 писал(а):всё равно никто чайник не выключает раньше закипания, а включают, как правило, потрогав его стенку
Андрей здравствуйте .. Прошу прощения..Андрей СШ писал(а):Про расположение датчика снаружи думал и пришёл к выводу, что нужна специальная процедура калибровки, Сделать можно но настройка муторной станет. Именно поэтому и предпочитаю просто градиент от синего к красному. Такая индикация в отличие от ступенчатой не требует точной калибровки.
Кроме того вообще в этой схеме есть два косяка:
1. Интерфейс "одна проволочка" требует точного соблюдения таймингов, а встроенный RC-генератор может поплыть при нагреве. Вывод: микроконтроллер надо располагать где похолодней (в ручке).
2. Говорят DS18B20 быстро дохнет при высоких температурах.
Исходный код тут. Над плавным переходом подумаю чуть позже, надо немного свои схемки доделать.
Спойлер
main.adbOne_Wire-AVR_Wiring.adsКод: Выделить всё
with AVR, AVR.MCU, AVR.Wait, Interfaces, One_Wire; use AVR, AVR.MCU,Interfaces; procedure Main is RED_pin: constant := 0; GREEN_pin: constant := 2; BLUE_pin: constant := 1; BEEP_pin: constant := 3; RED: boolean renames PORTB_Bits(RED_pin); GREEN: boolean renames PORTB_Bits(GREEN_pin); BLUE: boolean renames PORTB_Bits(BLUE_pin); BEEP: boolean renames PORTB_Bits(BEEP_pin); low_byte, high_byte, t: Unsigned_8 := 0; procedure Wait_ms is new AVR.Wait.Generic_Busy_Wait_Milliseconds(Crystal_hertz => 1_200_000); begin RED := low; GREEN := low; BLUE := low; BEEP := low; DDRB_Bits := (0..3 => DD_Output, others => DD_Input); loop if One_wire.Reset then One_Wire.Send_command(16#CC#); One_Wire.Send_command(16#44#); end if; Wait_ms(1000); if One_wire.Reset then One_Wire.Send_command(16#CC#); One_Wire.Send_command(16#BE#); low_byte := One_wire.Get; high_byte := One_wire.Get; end if; high_byte := shift_left(high_byte,4) and 2#0111_0000#; low_byte := shift_right(low_byte,4) and 2#0000_1111#; t := high_byte or low_byte; case t is when 1..30 => red := false; green := false; blue := true; beep := false; when 31..50 => red := false; green := true; blue := false; beep := false; when 51..70 => red := true; green := true; blue := false; beep := false; when 71..95 => red := true; green := false; blue := false; beep := false; when 96..110 => PINB_Bits(RED_pin) := true; green := false; blue := false; PINB_Bits(BEEP_pin) := true; when others => red := true; green := true; blue := true; beep := true; end case; end loop; end Main;MakefileКод: Выделить всё
--------------------------------------------------------------------------- -- The AVR-Ada Library is free software; you can redistribute it and/or -- -- modify it under terms of the GNU General Public License as published -- -- by the Free Software Foundation; either version 2, or (at your -- -- option) any later version. The AVR-Ada Library is distributed in the -- -- hope that it will be useful, but WITHOUT ANY WARRANTY; without even -- -- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -- -- PURPOSE. See the GNU General Public License for more details. -- -- -- -- As a special exception, if other files instantiate generics from this -- -- unit, or you link this unit with other files to produce an -- -- executable this unit does not by itself cause the resulting -- -- executable to be covered by the GNU General Public License. This -- -- exception does not however invalidate any other reasons why the -- -- executable file might be covered by the GNU Public License. -- --------------------------------------------------------------------------- with AVR; use AVR; with AVR.MCU; package One_Wire.AVR_Wiring is pragma Preelaborate; OW_Line : constant AVR.Bit_Number := 4; OW_DD : Boolean renames MCU.DDRB_Bits (OW_Line); OW_Out : Boolean renames MCU.PortB_Bits (OW_Line); OW_In : Boolean renames MCU.PinB_Bits (OW_Line); end One_Wire.AVR_Wiring;build.gprКод: Выделить всё
########################################################################### ## The AVR-Ada Library is free software; you can redistribute it and/or ## ## modify it under terms of the GNU General Public License as published ## ## by the Free Software Foundation; either version 2, or (at your ## ## option) any later version. The AVR#Ada Library is distributed in the ## ## hope that it will be useful, but WITHOUT ANY WARRANTY; without even ## ## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ## ## PURPOSE. See the GNU General Public License for more details. ## ########################################################################### # This makefile is adapted from the sample Makefile of WinAVR by Eric # B. Wedington, Jцrg Wunsch and others. As they released it to the # Public Domain, I could pretend that I wrote it myself. Honestly, I # removed many (probably useful) parts to better fit the GNAT project makes. # # On command line: # # make all = Make software. # # make clean = Clean out built project files. # # make file.prog = Upload the hex file to the device, using avrdude. # Please customize the avrdude settings below first! # # make filename.s = Just compile filename.adb into the assembler code only. # # # To rebuild project do "make clean" then "make all". #---------------------------------------------------------------------------- -include $(Makefile_pre) # MCU name MCU := attiny13 # GNAT project file GPR := build.gpr # put the names of the target files here (without extension) ADA_TARGETS := main #---------------- GNATMAKE Options ---------------- MFLAGS = -XMCU=$(MCU) -p -P$(GPR) # -p : Create missing obj, lib and exec dirs #---------------- Programming Options (avrdude) ---------------- # Output format. (can be srec, ihex, binary) FORMAT = ihex #---------------- Programming Options (avrdude) ---------------- # Programming hardware: alf avr910 avrisp bascom bsd # dt006 pavr picoweb pony-stk200 sp12 stk200 stk500 # # Type: avrdude -c ? # to get a full listing. # AVRDUDE_PROGRAMMER = ftbb # com1 = serial port. # programmer connected to serial device, add -b 57600 for Arduinos AVRDUDE_PORT = ft0 -B 19200 AVRDUDE_WRITE_FLASH = -U flash:w: AVRDUDE_WRITE_EEPROM = -U eeprom:w: AVRDUDE_READ_LFUSE = -U lfuse:r:lfuse.hex:i AVRDUDE_READ_HFUSE = -U hfuse:r:hfuse.hex:i AVRDUDE_READ_EFUSE = -U efuse:r:efuse.hex:i AVRDUDE_WRITE_LFUSE = -U lfuse:w:lfuse.hex:i AVRDUDE_WRITE_HFUSE = -U hfuse:w:hfuse.hex:i AVRDUDE_WRITE_EFUSE = -U efuse:w:efuse.hex:i # Uncomment the following if you want avrdude's erase cycle counter. # Note that this counter needs to be initialized first using -Yn, # see avrdude manual. #AVRDUDE_ERASE_COUNTER = -y # Uncomment the following if you do /not/ wish a verification to be # performed after programming the device. #AVRDUDE_NO_VERIFY = -V # Increase verbosity level. Please use this when submitting bug # reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> # to submit bug reports. #AVRDUDE_VERBOSE = -v -v AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY) AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE) AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) #====================== # Define programs and commands. SHELL := sh CC := avr-gcc OBJCOPY := avr-objcopy OBJDUMP := avr-objdump SIZE := avr-size NM := avr-nm AVRDUDE := C:\program files\ftbb\avrdude REMOVE := rm -f COPY := cp RENAME := mv WINSHELL := cmd GNATMAKE := avr-gnatmake RESET_FTBB := C:\Ada_Projects\release_reset_on_ftbb\release_reset_ftbb.exe # Combine all necessary flags and optional flags. # Add target processor to flags. ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS) # Default target. all: build ADA_TARGETS_ELF = $(addsuffix .elf, $(ADA_TARGETS)) ADA_TARGETS_HEX = $(addsuffix .hex, $(ADA_TARGETS)) ADA_TARGETS_EEP = $(addsuffix .eep, $(ADA_TARGETS)) ADA_TARGETS_LSS = $(addsuffix .lss, $(ADA_TARGETS)) ADA_TARGETS_SYM = $(addsuffix .sym, $(ADA_TARGETS)) ADA_TARGETS_SIZE = $(addsuffix .size, $(ADA_TARGETS)) # Create the necessary sub-directories SUBDIRS := obj lcdobj lcdlib build: $(ADA_TARGETS_ELF) $(ADA_TARGETS_HEX) $(ADA_TARGETS_EEP) \ $(ADA_TARGETS_LSS) $(ADA_TARGETS_SYM) $(ADA_TARGETS_SIZE) %.size: %.elf FORCE $(SIZE) --format=avr --mcu=$(MCU) $< # Program the device. %.prog: %.hex %.eep $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)$*.hex # $(AVRDUDE_WRITE_EEPROM) # Create final output files (.hex, .eep) from ELF output file. %.hex: %.elf $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@ %.eep: %.elf -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \ --change-section-lma .eeprom=0 -O $(FORMAT) $< $@ # Create extended listing file from ELF output file. %.lss: %.elf $(OBJDUMP) -h -S $< > $@ # Create a symbol table from ELF output file. %.sym: %.elf $(NM) -n $< > $@ # --- build and link using gnatmake, force rebuilding by gnatmake to # make sure dependencies are resolved %.elf: $(GPR) $(SUBDIRS) FORCE $(GNATMAKE) $(MFLAGS) -XAVRADA_MAIN=$* # Compile: create assembler files from Ada source files. %.s : %.adb $(GNATMAKE) -f -u $(MFLAGS) $< -cargs -S %.s : %.ads $(GNATMAKE) -f -u $(MFLAGS) $< -cargs -S # Assemble: create object files from assembler source files. %.o : %.S @echo @echo $(MSG_ASSEMBLING) $< $(CC) -c $(ALL_ASFLAGS) $< -o $@ # create the subdirectories $(SUBDIRS): $(REMOVE) -r $@ mkdir $@ # Target: clean project. clean: clean_gnat clean_list clean_gnat: avr-gnatclean -XMCU=$(MCU) -P$(GPR) clean_gnat_recursive: avr-gnatclean -r -XMCU=$(MCU) -P$(GPR) clean_list : $(REMOVE) *.hex $(REMOVE) *.eep $(REMOVE) *.elf $(REMOVE) *.map $(REMOVE) *.sym $(REMOVE) *.lss $(REMOVE) *.ali $(REMOVE) b~*.ad? $(REMOVE) -rf $(SUBDIRS) program: $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH)main.hex $(RESET_FTBB) FT232R\ USB\ UART read_fuses: $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_READ_LFUSE) $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_READ_HFUSE) # $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_READ_EFUSE) write_fuses: $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_HFUSE) $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_LFUSE) # $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_EFUSE) run: all program FORCE: # Listing of phony targets. .PHONY : all finish \ build elf hex eep lss sym clean clean_list program -include $(Makefile_post)Код: Выделить всё
--------------------------------------------------------------------------- -- The AVR-Ada Library is free software; you can redistribute it and/or -- -- modify it under terms of the GNU General Public License as published -- -- by the Free Software Foundation; either version 2, or (at your -- -- option) any later version. The AVR-Ada Library is distributed in the -- -- hope that it will be useful, but WITHOUT ANY WARRANTY; without even -- -- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -- -- PURPOSE. See the GNU General Public License for more details. -- --------------------------------------------------------------------------- project Build extends "avr_app" is for Object_Dir use "obj"; for Exec_Dir use "."; for Source_Dirs use ("."); end Build;
Слушайте, а что пишет даташит? Хотя там могут и приврать.Андрей СШ писал(а): По температурам DS18B20 слухи ходят именно о том, что при 125° оно работает, но не долго. ...
У меня был только один случай выхода из строя DS18B20, но температуры там были высокие (иногда больше 100°) и подолгу.
Заблуждение.Андрей СШ писал(а):С ABS проблем нет - размягчается при 170° и больше. Проблема в чипе - при высоких температурах электроника быстрее стареет.
честно говоря, размещение на корпусе, в ручке и в любом другом месте, кроме воды - это самообман. Никакой корректной температуры не получить. Показания будут зависеть от внешних воздействий - холодно ли в помещении, есть ли сквозняк, насколько долго холодно.Karl2233 писал(а):в даташите на корпусе явно меньше чем 100.
А кому нужна вообще точная температура воды в чайнике?
Хе-хе, подловили , что-ли?Karl2233 писал(а):да ну!А кому нужна вообще точная температура воды в чайнике?
Не, ну так и я о том же говорю, что особая не нужна.Karl2233 писал(а):а зачем мне совать палец в горячую или кипяток?!![]()
болевой порог возникает при 50С (+/-), вода кипит при 100С.
какая связь между пальцем и кипением воды?
я не подлавливаю, я говорю что мы пытаемся сделать показометр(цветомузыкукипение), и особая точность какбэ не нужна.