Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:93c0b23101f4, committed 2020-07-29
- Comitter:
- alanffrench
- Date:
- Wed Jul 29 18:38:27 2020 +0000
- Commit message:
- Brightness Increase Decrease
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GettingStarted.html Wed Jul 29 18:38:27 2020 +0000 @@ -0,0 +1,16 @@ +<!DOCTYPE HTML> +<html lang="en-US"> + <head> + <meta charset="UTF-8"> + <meta http-equiv="refresh" + content="1;url="https://os.mbed.com/docs/latest/tools/exporting.html> + <script type="text/javascript"> + window.location.href = "https://os.mbed.com/docs/latest/tools/exporting.html" + </script> + <title>Page Redirection</title> + </head> + <body> + If you are not redirected automatically, please follow the + <a href='https://os.mbed.com/docs/v5.6/tools/exporting.html/'>link to the online exporter documentation</a> + </body> +</html>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jul 29 18:38:27 2020 +0000 @@ -0,0 +1,25 @@ +#include "mbed.h" + +Serial pc(USBTX, USBRX); +PwmOut led(LED1); + +float brightness = 0.0; + +int main(){ + pc.printf("Press 'u' to turn LED1 brightness up, 'd' to turn it down\n"); + + while (1){ + char c = pc.getc(); + if((c=='u') && (brightness < 0.5)){ + brightness += 0.01; + led = brightness; + pc.putc('^'); + } + if((c=='d') && (brightness > 0.0)){ + brightness -= 0.01; + led = brightness; + pc.putc('v'); + } + } +} + \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jul 29 18:38:27 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed_config.h Wed Jul 29 18:38:27 2020 +0000 @@ -0,0 +1,55 @@ +/* + * mbed SDK + * Copyright (c) 2017 ARM Limited + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Automatically generated configuration file. +// DO NOT EDIT, content will be overwritten. + +#ifndef __MBED_CONFIG_DATA__ +#define __MBED_CONFIG_DATA__ + +// Configuration parameters +#define MBED_CONF_PLATFORM_CRASH_CAPTURE_ENABLED 0 // set by library:platform +#define MBED_CONF_PLATFORM_CTHUNK_COUNT_MAX 8 // set by library:platform +#define MBED_CONF_PLATFORM_DEFAULT_SERIAL_BAUD_RATE 9600 // set by library:platform +#define MBED_CONF_PLATFORM_ERROR_ALL_THREADS_INFO 0 // set by library:platform +#define MBED_CONF_PLATFORM_ERROR_DECODE_HTTP_URL_STR "\nFor more info, visit: https://armmbed.github.io/mbedos-error/?error=0x%08X" // set by library:platform +#define MBED_CONF_PLATFORM_ERROR_FILENAME_CAPTURE_ENABLED 0 // set by library:platform +#define MBED_CONF_PLATFORM_ERROR_HIST_ENABLED 0 // set by library:platform +#define MBED_CONF_PLATFORM_ERROR_HIST_SIZE 4 // set by library:platform +#define MBED_CONF_PLATFORM_ERROR_REBOOT_MAX 1 // set by library:platform +#define MBED_CONF_PLATFORM_FATAL_ERROR_AUTO_REBOOT_ENABLED 0 // set by library:platform +#define MBED_CONF_PLATFORM_FORCE_NON_COPYABLE_ERROR 0 // set by library:platform +#define MBED_CONF_PLATFORM_MAX_ERROR_FILENAME_LEN 16 // set by library:platform +#define MBED_CONF_PLATFORM_POLL_USE_LOWPOWER_TIMER 0 // set by library:platform +#define MBED_CONF_PLATFORM_STDIO_BAUD_RATE 9600 // set by library:platform +#define MBED_CONF_PLATFORM_STDIO_BUFFERED_SERIAL 0 // set by library:platform +#define MBED_CONF_PLATFORM_STDIO_CONVERT_NEWLINES 0 // set by library:platform +#define MBED_CONF_PLATFORM_STDIO_CONVERT_TTY_NEWLINES 0 // set by library:platform +#define MBED_CONF_PLATFORM_STDIO_FLUSH_AT_EXIT 1 // set by library:platform +#define MBED_CONF_PLATFORM_USE_MPU 1 // set by library:platform +#define MBED_CONF_TARGET_BOOT_STACK_SIZE 0x1000 // set by target:Target +#define MBED_CONF_TARGET_CONSOLE_UART 1 // set by target:Target +#define MBED_CONF_TARGET_DEEP_SLEEP_LATENCY 0 // set by target:Target +#define MBED_CONF_TARGET_DEFAULT_ADC_VREF NAN // set by target:Target +#define MBED_CONF_TARGET_INIT_US_TICKER_AT_BOOT 0 // set by target:Target +#define MBED_CONF_TARGET_MPU_ROM_END 0x0fffffff // set by target:Target +#define MBED_CONF_TARGET_NETWORK_DEFAULT_INTERFACE_TYPE ETHERNET // set by target:LPC1768 +#define MBED_CONF_TARGET_TICKLESS_FROM_US_TICKER 0 // set by target:Target +#define MBED_CONF_TARGET_US_TICKER_TIMER 3 // set by target:LPC1768 +#define MBED_CONF_TARGET_XIP_ENABLE 0 // set by target:Target + +#endif