[SOLVED] Can't change number of Sound Channels

For problems with Gamebuino itself, NOT your project

[SOLVED] Can't change number of Sound Channels

Postby Skyrunner65 » Thu Jan 01, 2015 2:26 am

Whenever I try to change the Number of channels and then save it, a bunch of errors will come up from the Library.
I'm using Notepad for this, am I supposed to use something else?
Last edited by Skyrunner65 on Sun Jan 04, 2015 6:48 pm, edited 2 times in total.
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

Re: Settings.c gone wrong

Postby rodot » Fri Jan 02, 2015 12:33 am

I just successfully compiled Crabator with 0, 1 and 4 sound channels using the latest version of the library. If you don't give us more detail we won't be able to help... how many channels did you try to set ? What error message do you get ?
When you ask for help, you should always give us details, contexts, and the error you get.
Edit : And please use a more descriptive topic title so we know what your topic is about, like "Changing the number of channels doesn't compile"
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Settings.c gone wrong

Postby Skyrunner65 » Fri Jan 02, 2015 2:18 am

Sorry, I'll fix it.
I'm trying to change it to 4 channels, and the demo I'm using to test this is the "Music" Example.

Again, using Notepad.
Code: Select all
In file included from C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/Gamebuino.h:26,
                 from Music.ino:2:
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\357' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\273' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\277' in program
In file included from C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/Backlight.h:24,
                 from C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/Gamebuino.h:27,
                 from Music.ino:2:
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\357' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\273' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\277' in program
In file included from C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/Display.h:27,
                 from C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/Gamebuino.h:28,
                 from Music.ino:2:
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\357' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\273' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\277' in program
In file included from C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/Buttons.h:24,
                 from C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/Gamebuino.h:29,
                 from Music.ino:2:
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\357' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\273' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\277' in program
In file included from C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/Battery.h:24,
                 from C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/Gamebuino.h:30,
                 from Music.ino:2:
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\357' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\273' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\277' in program
In file included from C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/Sound.h:25,
                 from C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/Gamebuino.h:31,
                 from Music.ino:2:
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\357' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\273' in program
C:\Documents and Settings\Iobst\My Documents\Arduino\libraries\Gamebuino/settings.c:1: error: stray '\277' in program
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

Re: Can't change number of Sound Channels

Postby rodot » Fri Jan 02, 2015 8:40 am

Have you tried to compile a simple example like "hello workd" to make sure it doesn't come from your program ? Something seems to be wrong on the line 1 if your settings.c file, could you post its content ? Thanks
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Can't change number of Sound Channels

Postby Skyrunner65 » Fri Jan 02, 2015 5:37 pm

Here is the first line of it:
Code: Select all
/*
 * (C) Copyright 2014 Aurélien Rodot. All rights reserved.
 *
 * This file is part of the Gamebuino Library (http://gamebuino.com)
 *
 * The Gamebuino Library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>
 */

#ifndef SETTINGS_C
#define   SETTINGS_C

#define NOROT 0
#define ROTCCW 1
#define ROT180 2
#define ROTCW 3

//SETTINGS YOU CAN EDIT

#define NUM_CHANNELS 4 //number of sound channels, between 0 and 4
#define D

Did it with hello world, still gave me the same.
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

Re: Can't change number of Sound Channels

Postby rodot » Sat Jan 03, 2015 6:42 pm

The errors you get are because you use non-ascii characters (see this topic on stack overflow).
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Can't change number of Sound Channels

Postby Skyrunner65 » Sun Jan 04, 2015 6:48 pm

I had to get an ASCII text editor, but I don't care!
It works now, thank you!
User avatar
Skyrunner65
 
Posts: 371
Joined: Thu Mar 20, 2014 5:37 pm
Location: NC,USA

Re: [SOLVED] Can't change number of Sound Channels

Postby rodot » Mon Jan 05, 2015 4:46 pm

The Arduino IDE or Notepad++ seem to be a good start to me ^^
If you want more features (more an IDE than a text editor) then you can use Netbeans, there is a module for it to support Arduino.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France


Return to Installation & Troubleshooting

Who is online

Users browsing this forum: No registered users and 12 guests

cron