Update cubesatsim.ino

pull/153/head
alanbjohnston 4 years ago committed by GitHub
parent c33acdcfcb
commit d92a1070a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2243,19 +2243,20 @@ void loop1() {
// pwm_counter -= pwm_counter_max; // pwm_counter -= pwm_counter_max;
pwm_rnd_bit = (buffer[wav_position] > 0) ? HIGH: LOW; pwm_rnd_bit = (buffer[wav_position] > 0) ? HIGH: LOW;
digitalWrite(AUDIO_OUT_PIN, pwm_rnd_bit); digitalWrite(AUDIO_OUT_PIN, pwm_rnd_bit);
/*
pwm_rnd_bit = (buffer[wav_position] > 0) ? 1 : 0;
if ((pwm_value == (128 - pwm_amplitude)) && (pwm_rnd_bit == 1)) { // pwm_rnd_bit = (buffer[wav_position] > 0) ? 1 : 0;
pwm_value = 128 + pwm_amplitude;
// Serial.print("-"); if (pwm_rnd_bit == 1) {
// pwm_value = 128 + pwm_amplitude;
Serial.print("-");
} }
else { else {
pwm_value = 128 - pwm_amplitude; // pwm_value = 128 - pwm_amplitude;
// Serial.print("_"); Serial.print("_");
} }
pwm_set_gpio_level(AUDIO_OUT_PIN, pwm_value); // pwm_set_gpio_level(AUDIO_OUT_PIN, pwm_value);
// Serial.println("wav_position: "); // Serial.println("wav_position: ");
// Serial.println(wav_position); // Serial.println(wav_position);
*/ */

Loading…
Cancel
Save

Powered by TurnKey Linux.