Jump to content


  • Content Count

  • Joined

  • Last visited

  1. i correct the code but now it says this following error: c:/users/alex narvais/downloads/energia-0101e0017-windows/energia-0101e0017/hardware/tools/msp430/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld.exe: sinewave.cpp.elf section `.bss' will not fit in region `ram' c:/users/alex narvais/downloads/energia-0101e0017-windows/energia-0101e0017/hardware/tools/msp430/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld.exe: region `ram' overflowed by 1114 bytes collect2: ld returned 1 exit status
  2. int pi = 3; int button=0; int i=0; int sina[]={}; int bits[100][8]={}; void setup() { pinMode(2, OUTPUT); pinMode(3, OUTPUT); pinMode(4, OUTPUT); pinMode(5, INPUT); //PIN P1.3 for switch pinMode(6, OUTPUT); pinMode(7, OUTPUT); pinMode(8, OUTPUT); pinMode(9, OUTPUT); pinMode(10, OUTPUT); } void loop() { button=digitalRead(5); delay(5); for( i=0; i<100; i++) { sina=4+4*sin(100*i/(2*pi)); //This code will be an integer value // between 0 and 8 if(sina>4) bits[7]=1; //MSB of the output else if(sina/
  3. what do you mean about having code outside of setup that isn't in a function
  4. hello i get these errors and not sure how to correct them sinewave.cpp:21:15: error: expected ']' before ',' token sinewave.cpp:21:16: error: expected unqualified-id before numeric constant sinewave.cpp:22:1: error: expected unqualified-id before 'for' sinewave.cpp:22:11: error: 'i' does not name a type sinewave.cpp:22:18: error: 'i' does not name a type sinewave.cpp: In function 'void loop()': sinewave.cpp:44:3: error: 'inp' was not declared in this scope sinewave.cpp:51:30: error: 'bits' was not declared in this scope sinewave.cpp:67:30: error: 'bits' was not declared in this scope HERE
  • Create New...