Tinyzero kicked off port when certain sketches uploaded.

DeepMake_Luke

  • Full Member
  • ***
    • Posts: 12
    • View Profile
Hey all,

When I upload the audio amplifier example sketch to my tinyzero/wireling adapter it disconnects itself from the port (after successful upload), and in order for it to be available/visible on the port once more I need to put it into bootloader mode.

This does not happen when I upload the blink sketch.

Does anyone know what may be the cause of this?

Thanks!

Luke


lennevia

  • Administrator
  • Hero Member
  • *****
    • Posts: 437
    • View Profile
Hello Luke,

Are you approaching any memory limits with the sketch? There are some tips at the bottom of the tutorial in the Troubleshooting section: https://tinycircuits.com/blogs/learn/audio-amplifier-wireling-tutorial

Let me know if that helps!

Cheers,
Réna


DeepMake_Luke

  • Full Member
  • ***
    • Posts: 12
    • View Profile
The sketch I am uploading is the unaltered example sketch (so I have not changed the audio files). When uploading it says it's using 30% of the program storage space. Once uploaded too, I cannot hear any sound from the speaker except for a super super quiet static sound.

Thanks so much for your help btw.


DeepMake_Luke

  • Full Member
  • ***
    • Posts: 12
    • View Profile
Another quick question if that's OK?

I am going through the tutorial, and attempting to use my own audio. In the 'Audio Conversion' section of the tutorial it says that I should take the following actions:

Navigate to the Arduino project folder downloaded earlier using a file explorer
Left click/select all the text in the file path bar and type 'cmd'

It seems this is only for windows users. Is there a way to do this on a mac?

________________

Update - This is my attempt at doing the mac version (sorry if I am sounding a bit stupid here btw): So I right clicked on audioamplifierwireling in the path in the finder, and clicked 'open in terminal'. Then pasted in 'bin2header.exe sample.raw' and this returned the following:

luke@Lukes-MBP AudioAmplifierWireling % bin2header.exe sample.raw
zsh: command not found: bin2header.exe
« Last Edit: April 14, 2023, 05:02:10 AM by DeepMake_Luke »


lennevia

  • Administrator
  • Hero Member
  • *****
    • Posts: 437
    • View Profile
I'll chalk the need to use the bootloader up to some of the timing and interrupt situations in the audio example program putting the processor in an irregular state that interferes with the ability to communicate with the computer port consistently for re-programming. Other programs that don't use interrupts, like the blink example, will give better odds at keeping the processor in a more recognizable state for USB serial communication.

The tutorial was written with Windows in mind, so the apple terminal isn't directly compatible with the instructions - you may be able to use an online tool to convert a file to a C header - can you try out this? https://notisrac.github.io/FileToCArray/

Cheers,
Réna


DeepMake_Luke

  • Full Member
  • ***
    • Posts: 12
    • View Profile
Thanks again for your support, however I still cannot get a sound out of the speaker/amplifier, even when I use the example sketch (so without changing the sound file).

Is there a simple way I can just check if it's working? Just to get it to make any sort of noise at all?


lennevia

  • Administrator
  • Hero Member
  • *****
    • Posts: 437
    • View Profile
Luke,

You can check that the speaker works by using the buzzer example here: https://learn.tinycircuits.com/Wirelings/Buzzer_Wireling_Tutorial/

Or here's the direct download to the example: https://github.com/TinyCircuits/TinyCircuits-Wireling-Buzzer-AST1035/raw/master/examples/Buzzer_Wireling_example.zip

You'll plug the amplifier into port 0 and you should hear a few tones when the program compiles.

Cheers,
Réna


DeepMake_Luke

  • Full Member
  • ***
    • Posts: 12
    • View Profile

lennevia

  • Administrator
  • Hero Member
  • *****
    • Posts: 437
    • View Profile
Glad that worked out! I'm still concerned about he audio amplifier Wireling example, however, and I'd like to help get that working.

After reviewing the tutorial, there may be an issue with downloading the example folder so that the files stay intact in the same file directory after unzipping. Can you try downloading the attached zipped folder, keeping the files all in the same folder and open the example by double clicking on the .ino file?

The folder should look like the attached screenshot after you unzip it and you'll double click on AudioAmplifierWireling.ino to open it.

Note: If you can't see the attachments on this message, you'll just need to log in to the forum to view and download them.


 

SMF spam blocked by CleanTalk