Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A strange problem. #18

Closed
GerrieWell opened this issue Feb 25, 2017 · 1 comment
Closed

A strange problem. #18

GerrieWell opened this issue Feb 25, 2017 · 1 comment

Comments

@GerrieWell
Copy link

LinkedList<int> mMagBiasX = LinkedList<int>();
void magcalMPU9250_2() {
	int sample_count;
	Serial.println("Mag Calibration ");
	mMagBiasX.clear();
	for(;;){

//		Serial.println(mag_temp[0]);
		int t = 0;
		//memcpy(&t,&mag_temp[0],sizeof(int16_t));		#2
		t = -1;	//t =mag_temp[0];                                          #1
		mMagBiasX.add(t);
// 		delay(135);  // at 8 Hz ODR, new mag data is available every 125 ms
		delay(16);
 		//if(calibBut.uniquePress())
 		//	break;
 		Serial.println(sample_count);
 		Serial.println(mMagBiasX.size());
 	}
}

Just copy this function to SimpleIntegerList.pde . and call it from setup .Then the loop will stuck at about the 176th call (Arduino uno).
and comment # 1 line out ,u will see the loop work again . I don't know why .Maybe relative to the memory ,so maybe it is arduino false . I don't know and give up .Just hope you notice this.

@ivanseidel
Copy link
Owner

Closing, since a few improvements have been made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants