int main()
{
	vector<Readings> read_temps;

	fill_from_file(read_temps, "raw_temps.txt");

	cout << "The mean reading is: " << mean_readings(read_temps) << '\n';
	cout << "The median reading is: " << median_readings(read_temps) << '\n';
}
Example #2
0
int main(void)
{
	uart_init(UART_BAUD_SELECT(UART_BAUD_RATE,F_CPU));
	i2c_init();
	buck_init();
	buckAdc_init();
	sei();
	//Turn off buck converter
	DDRB |= (1<<DDB0);
	PORTB |= (1<<PORTB0);
	
	while(1)
	{
		cell_numberCount();
		cell_adcReadings();
		cell_balance();
		uart_out();
		mean_readings();
		if (PINB & (1<<PORTB1)) buck(ENABLE);
		else buck(DISABLE);
	}
	
	return 0;
}