mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-18 07:52:14 +01:00
Robot_Control: Update PROGMEM for compatibily with newer gcc
This commit is contained in:
parent
01e0a49c51
commit
887d9be442
@ -1,14 +1,14 @@
|
||||
#include <avr/pgmspace.h>
|
||||
#include <ArduinoRobot.h>
|
||||
|
||||
prog_char script1[] PROGMEM="Wheel Calibration\n";
|
||||
prog_char script2[] PROGMEM="1. Put Robot on a flat surface\n";
|
||||
prog_char script3[] PROGMEM="2. Adjust speed with the knob on top\n";
|
||||
prog_char script4[] PROGMEM="3. If robot goes straight, it's done\n";
|
||||
prog_char script5[] PROGMEM="4. Use screwdriver on the trim on bottom\n";
|
||||
prog_char script6[] PROGMEM="Robot turns left, screw it clockwise;\n";
|
||||
prog_char script7[] PROGMEM="Turns right, screw it ct-colockwise;\n";
|
||||
prog_char script8[] PROGMEM="5. Repeat 4 until going straight\n";
|
||||
const char script1[] PROGMEM="Wheel Calibration\n";
|
||||
const char script2[] PROGMEM="1. Put Robot on a flat surface\n";
|
||||
const char script3[] PROGMEM="2. Adjust speed with the knob on top\n";
|
||||
const char script4[] PROGMEM="3. If robot goes straight, it's done\n";
|
||||
const char script5[] PROGMEM="4. Use screwdriver on the trim on bottom\n";
|
||||
const char script6[] PROGMEM="Robot turns left, screw it clockwise;\n";
|
||||
const char script7[] PROGMEM="Turns right, screw it ct-colockwise;\n";
|
||||
const char script8[] PROGMEM="5. Repeat 4 until going straight\n";
|
||||
|
||||
char buffer[42];//must be longer than text
|
||||
|
||||
|
@ -81,7 +81,7 @@ osc_t osc[4];
|
||||
uint8_t pcm = 128;
|
||||
|
||||
// ProTracker period tables
|
||||
uint16_t period_tbl[84] PROGMEM = {
|
||||
const uint16_t period_tbl[84] PROGMEM = {
|
||||
3424, 3232, 3048, 2880, 2712, 2560, 2416, 2280, 2152, 2032, 1920, 1814,
|
||||
1712, 1616, 1524, 1440, 1356, 1280, 1208, 1140, 1076, 1016, 960, 907,
|
||||
856, 808, 762, 720, 678, 640, 604, 570, 538, 508, 480, 453,
|
||||
@ -92,7 +92,7 @@ uint16_t period_tbl[84] PROGMEM = {
|
||||
};
|
||||
|
||||
// ProTracker sine table
|
||||
int8_t sine_tbl[32] PROGMEM = {
|
||||
const int8_t sine_tbl[32] PROGMEM = {
|
||||
0x00, 0x0C, 0x18, 0x25, 0x30, 0x3C, 0x47, 0x51, 0x5A, 0x62, 0x6A, 0x70, 0x76, 0x7A, 0x7D, 0x7F,
|
||||
0x7F, 0x7F, 0x7D, 0x7A, 0x76, 0x70, 0x6A, 0x62, 0x5A, 0x51, 0x47, 0x3C, 0x30, 0x25, 0x18, 0x0C,
|
||||
};
|
||||
|
@ -13,7 +13,7 @@ class StreamFile : public SquawkStream {
|
||||
|
||||
static StreamFile file;
|
||||
|
||||
extern uint16_t period_tbl[84] PROGMEM;
|
||||
extern const uint16_t period_tbl[84] PROGMEM;
|
||||
|
||||
void SquawkSynthSD::play(Fat16 melody) {
|
||||
SquawkSynth::pause();
|
||||
|
@ -6,8 +6,8 @@
|
||||
|
||||
// standard ascii 5x7 font
|
||||
|
||||
static unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
static const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C,
|
||||
|
@ -4,20 +4,20 @@
|
||||
//as the ram of Arduino is very tiny, keeping too many string in it
|
||||
//can kill the program
|
||||
|
||||
prog_char hello_user_script1[] PROGMEM="What's your name?";
|
||||
prog_char hello_user_script2[] PROGMEM="Give me a name!";
|
||||
prog_char hello_user_script3[] PROGMEM="And the country?";
|
||||
prog_char hello_user_script4[] PROGMEM="The city you're in?";
|
||||
prog_char hello_user_script5[] PROGMEM=" Plug me to\n\n your computer\n\n and start coding!";
|
||||
const char hello_user_script1[] PROGMEM="What's your name?";
|
||||
const char hello_user_script2[] PROGMEM="Give me a name!";
|
||||
const char hello_user_script3[] PROGMEM="And the country?";
|
||||
const char hello_user_script4[] PROGMEM="The city you're in?";
|
||||
const char hello_user_script5[] PROGMEM=" Plug me to\n\n your computer\n\n and start coding!";
|
||||
|
||||
prog_char hello_user_script6[] PROGMEM=" Hello User!\n\n It's me, your robot\n\n I'm alive! <3";
|
||||
prog_char hello_user_script7[] PROGMEM=" First I need some\n\n input from you!";
|
||||
prog_char hello_user_script8[] PROGMEM=" Use the knob\n\n to select letters";
|
||||
prog_char hello_user_script9[] PROGMEM=" Use L/R button\n\n to move the cursor,\n\n middle to confirm";
|
||||
prog_char hello_user_script10[] PROGMEM=" Press middle key\n to continue...";
|
||||
prog_char hello_user_script11[] PROGMEM=" Choose \"enter\" to\n\n finish the input";
|
||||
const char hello_user_script6[] PROGMEM=" Hello User!\n\n It's me, your robot\n\n I'm alive! <3";
|
||||
const char hello_user_script7[] PROGMEM=" First I need some\n\n input from you!";
|
||||
const char hello_user_script8[] PROGMEM=" Use the knob\n\n to select letters";
|
||||
const char hello_user_script9[] PROGMEM=" Use L/R button\n\n to move the cursor,\n\n middle to confirm";
|
||||
const char hello_user_script10[] PROGMEM=" Press middle key\n to continue...";
|
||||
const char hello_user_script11[] PROGMEM=" Choose \"enter\" to\n\n finish the input";
|
||||
|
||||
PROGMEM const char *scripts_Hello_User[]={
|
||||
const char * const scripts_Hello_User[] PROGMEM = {
|
||||
hello_user_script1,
|
||||
hello_user_script2,
|
||||
hello_user_script3,
|
||||
|
Loading…
x
Reference in New Issue
Block a user