Skip to content
Snippets Groups Projects
Commit eb0b3862 authored by gross1989's avatar gross1989
Browse files

default example

der RIOT Ordner liegt in ../RIOT
parents
No related branches found
No related tags found
No related merge requests found
Makefile 0 → 100644
# name of your application
APPLICATION = default
# If no BOARD is found in the environment, use this default:
BOARD ?= native
# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../RIOT
# Uncomment these lines if you want to use platform support from external
# repositories:
#RIOTCPU ?= $(CURDIR)/../../RIOT/thirdparty_cpu
#RIOTBOARD ?= $(CURDIR)/../../RIOT/thirdparty_boards
# Uncomment this to enable scheduler statistics for ps:
#CFLAGS += -DSCHEDSTATISTICS
# If you want to use native with valgrind, you should recompile native
# with the target all-valgrind instead of all:
# make -B clean all-valgrind
# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
# development process:
CFLAGS += -DDEVELHELP
# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1
# Modules to include:
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += ps
USEMODULE += config
# include and auto-initialize all available sensors
USEMODULE += saul_reg
USEMODULE += saul_default
USEMODULE += auto_init_saul
BOARD_PROVIDES_NETIF := airfy-beacon fox iotlab-m3 mulle native nrf51dongle \
nrf6310 pba-d-01-kw2x pca10000 pca10005 saml21-xpro samr21-xpro spark-core \
yunjia-nrf51822
ifneq (,$(filter $(BOARD),$(BOARD_PROVIDES_NETIF)))
# Use modules for networking
# gnrc is a meta module including all required, basic gnrc networking modules
USEMODULE += gnrc
# use the default network interface for the board
USEMODULE += gnrc_netdev_default
# automatically initialize the network interface
USEMODULE += auto_init_gnrc_netif
# the application dumps received packets to stdout
USEMODULE += gnrc_pktdump
# We use only the lower layers of the GNRC network stack, hence, we can
# reduce the size of the packet buffer a bit
CFLAGS += -DGNRC_PKTBUF_SIZE=512
endif
FEATURES_OPTIONAL += config
FEATURES_OPTIONAL += periph_rtc
ifneq (,$(filter msb-430,$(BOARD)))
USEMODULE += sht11
endif
ifneq (,$(filter msba2,$(BOARD)))
USEMODULE += sht11
USEMODULE += mci
USEMODULE += random
endif
include $(RIOTBASE)/Makefile.include
Softwareprojekt calculator-iot
Taschenrechner-Software für IoT auf Basis von RIOT
main.c 0 → 100644
/*
* Copyright (C) 2008, 2009, 2010 Kaspar Schleiser <kaspar@schleiser.de>
* Copyright (C) 2013 INRIA
* Copyright (C) 2013 Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup examples
* @{
*
* @file
* @brief Default application that shows a lot of functionality of RIOT
*
* @author Kaspar Schleiser <kaspar@schleiser.de>
* @author Oliver Hahm <oliver.hahm@inria.fr>
* @author Ludwig Knüpfer <ludwig.knuepfer@fu-berlin.de>
*
* @}
*/
#include <stdio.h>
#include <string.h>
#include "thread.h"
#include "shell.h"
#include "shell_commands.h"
#if FEATURE_PERIPH_RTC
#include "periph/rtc.h"
#endif
#ifdef MODULE_LTC4150
#include "ltc4150.h"
#endif
#ifdef MODULE_NETIF
#include "net/gnrc/pktdump.h"
#include "net/gnrc.h"
#endif
int main(void)
{
#ifdef MODULE_LTC4150
ltc4150_start();
#endif
#ifdef FEATURE_PERIPH_RTC
rtc_init();
#endif
#ifdef MODULE_NETIF
gnrc_netreg_entry_t dump;
dump.pid = gnrc_pktdump_pid;
dump.demux_ctx = GNRC_NETREG_DEMUX_CTX_ALL;
gnrc_netreg_register(GNRC_NETTYPE_UNDEF, &dump);
#endif
(void) puts("Welcome to RIOT!");
char line_buf[SHELL_DEFAULT_BUFSIZE];
shell_run(NULL, line_buf, SHELL_DEFAULT_BUFSIZE);
return 0;
}
#!/bin/bash
sudo ip tuntap add tap0 mode tap user ${USER}
sudo ip link set tap0 up
#!/bin/bash
sudo ip link delete tap0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment