clean
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.microchip.xc8</ToolchainName>
|
||||
<ProjectGuid>2285C48D-296E-43FD-A7B6-69885F64CFFD</ProjectGuid>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<OutputType>Executable</OutputType>
|
||||
<Language>C</Language>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.elf</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<AssemblyName>opdracht 2.7a</AssemblyName>
|
||||
<Name>opdracht 2.7a</Name>
|
||||
<RootNamespace>opdracht 2.7a</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="main.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
|
||||
</Project>
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.6.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\xc8\avr\include\avr\iom128.h</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>XC</Condition>
|
||||
<FileContentHash>JdJ7J9I/SJh965SEyyyVYw==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>xc8/avr/include/avr/iom128.h</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.6.364/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.6.364</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
@@ -1,104 +0,0 @@
|
||||
/*
|
||||
* main.c
|
||||
*
|
||||
* Created: 08-Feb-21 10:03:33 AM
|
||||
* Author: lemms
|
||||
*/
|
||||
# define F_CPU 10000000UL
|
||||
|
||||
#include <util/delay.h>
|
||||
#include <xc.h>
|
||||
|
||||
typedef enum {
|
||||
IDLE,
|
||||
PERPARE_COFFEE_POWDER,
|
||||
BOIL_WATER,
|
||||
POUR_COFFEE
|
||||
} state ;
|
||||
|
||||
typedef enum {
|
||||
false = 0,
|
||||
true = 1
|
||||
} bool;
|
||||
|
||||
state current_state;
|
||||
|
||||
void wait( int ms )
|
||||
{
|
||||
for (int i=0; i<ms; i++)
|
||||
{
|
||||
_delay_ms( 1 ); // library function (max 30 ms at 8MHz)
|
||||
}
|
||||
}
|
||||
|
||||
void setPulveriserState(bool state){
|
||||
// set coffee powder mill on or off;
|
||||
}
|
||||
|
||||
bool checkCoffeePowderLevel(){
|
||||
// check sensor
|
||||
return true;
|
||||
}
|
||||
|
||||
void updateScreen(){
|
||||
// update its display;
|
||||
if(...){
|
||||
current_state = PERPARE_COFFEE_POWDER;
|
||||
}
|
||||
}
|
||||
|
||||
void setBoilerState(bool state){
|
||||
// set boiler on or off;
|
||||
}
|
||||
|
||||
bool checkWaterTemp(){
|
||||
// check sensor
|
||||
return true;
|
||||
}
|
||||
|
||||
long milisPouring;
|
||||
|
||||
void setPourPumpState(bool state){
|
||||
// set pump on or off;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
while(1)
|
||||
{
|
||||
switch(state){
|
||||
case IDLE:
|
||||
updateScreen();
|
||||
break;
|
||||
|
||||
case PERPARE_COFFEE_POWDER:
|
||||
bool coffeeLevel = checkCoffeePowderLevel();
|
||||
setPulveriserState(!coffeeLevel);
|
||||
|
||||
if(coffeeLevel){
|
||||
current_state = BOIL_WATER;
|
||||
}
|
||||
break;
|
||||
|
||||
case BOIL_WATER:
|
||||
bool waterTemp = checkWaterTemp();
|
||||
setBoilerState(!waterTemp);
|
||||
if(waterTemp){
|
||||
current_state = POUR_COFFEE;
|
||||
}
|
||||
break;
|
||||
|
||||
case POUR_COFFEE:
|
||||
bool shouldPour = !(milisPouring => 2000);
|
||||
setPourPumpState(shouldPour);
|
||||
|
||||
milisPouring++;
|
||||
|
||||
if(!shouldPour){
|
||||
milisPouring = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
wait(1);
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Store xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="AtmelPackComponentManagement">
|
||||
<ProjectComponents>
|
||||
<ProjectComponent z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
|
||||
<CApiVersion></CApiVersion>
|
||||
<CBundle></CBundle>
|
||||
<CClass>Device</CClass>
|
||||
<CGroup>Startup</CGroup>
|
||||
<CSub></CSub>
|
||||
<CVariant></CVariant>
|
||||
<CVendor>Atmel</CVendor>
|
||||
<CVersion>1.6.0</CVersion>
|
||||
<DefaultRepoPath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs</DefaultRepoPath>
|
||||
<DependentComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" />
|
||||
<Description></Description>
|
||||
<Files xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:anyType i:type="FileInfo">
|
||||
<AbsolutePath>C:/Program Files (x86)\Atmel\Studio\7.0\Packs\atmel\ATmega_DFP\1.6.364\xc8\avr\include\avr\iom128.h</AbsolutePath>
|
||||
<Attribute></Attribute>
|
||||
<Category>header</Category>
|
||||
<Condition>XC</Condition>
|
||||
<FileContentHash>JdJ7J9I/SJh965SEyyyVYw==</FileContentHash>
|
||||
<FileVersion></FileVersion>
|
||||
<Name>xc8/avr/include/avr/iom128.h</Name>
|
||||
<SelectString></SelectString>
|
||||
<SourcePath></SourcePath>
|
||||
</d4p1:anyType>
|
||||
</Files>
|
||||
<PackName>ATmega_DFP</PackName>
|
||||
<PackPath>C:/Program Files (x86)/Atmel/Studio/7.0/Packs/atmel/ATmega_DFP/1.6.364/Atmel.ATmega_DFP.pdsc</PackPath>
|
||||
<PackVersion>1.6.364</PackVersion>
|
||||
<PresentInProject>true</PresentInProject>
|
||||
<ReferenceConditionId>ATmega128</ReferenceConditionId>
|
||||
<RteComponents xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
|
||||
<d4p1:string></d4p1:string>
|
||||
</RteComponents>
|
||||
<Status>Resolved</Status>
|
||||
<VersionMode>Fixed</VersionMode>
|
||||
<IsComponentInAtProject>true</IsComponentInAtProject>
|
||||
</ProjectComponent>
|
||||
</ProjectComponents>
|
||||
</Store>
|
||||
@@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectVersion>7.0</ProjectVersion>
|
||||
<ToolchainName>com.microchip.xc8</ToolchainName>
|
||||
<ProjectGuid>{b7ed8d27-9387-4a45-a238-923f89602fb5}</ProjectGuid>
|
||||
<avrdevice>ATmega128</avrdevice>
|
||||
<avrdeviceseries>none</avrdeviceseries>
|
||||
<OutputType>Executable</OutputType>
|
||||
<Language>C</Language>
|
||||
<OutputFileName>$(MSBuildProjectName)</OutputFileName>
|
||||
<OutputFileExtension>.elf</OutputFileExtension>
|
||||
<OutputDirectory>$(MSBuildProjectDirectory)\$(Configuration)</OutputDirectory>
|
||||
<AssemblyName>opdracht 2.7a</AssemblyName>
|
||||
<Name>opdracht 1.7a</Name>
|
||||
<RootNamespace>opdracht 2.7a</RootNamespace>
|
||||
<ToolchainFlavour>XC8_2.31</ToolchainFlavour>
|
||||
<KeepTimersRunning>true</KeepTimersRunning>
|
||||
<OverrideVtor>false</OverrideVtor>
|
||||
<CacheFlash>true</CacheFlash>
|
||||
<ProgFlashFromRam>true</ProgFlashFromRam>
|
||||
<RamSnippetAddress />
|
||||
<UncachedRange />
|
||||
<preserveEEPROM>true</preserveEEPROM>
|
||||
<OverrideVtorValue />
|
||||
<BootSegment>2</BootSegment>
|
||||
<ResetRule>0</ResetRule>
|
||||
<eraseonlaunchrule>0</eraseonlaunchrule>
|
||||
<EraseKey />
|
||||
<AsfFrameworkConfig>
|
||||
<framework-data xmlns="">
|
||||
<options />
|
||||
<configurations />
|
||||
<files />
|
||||
<documentation help="" />
|
||||
<offline-documentation help="" />
|
||||
<dependencies>
|
||||
<content-extension eid="atmel.asf" uuidref="Atmel.ASF" version="3.49.1" />
|
||||
</dependencies>
|
||||
</framework-data>
|
||||
</AsfFrameworkConfig>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<ToolchainSettings />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
|
||||
<ToolchainSettings />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="main.c">
|
||||
<SubType>compile</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<Import Project="$(AVRSTUDIO_EXE_PATH)\\Vs\\Compiler.targets" />
|
||||
</Project>
|
||||
Reference in New Issue
Block a user