Code not working on 1 board but fine on other two
Posted: Wed Jul 07, 2021 4:25 pm
I have 3 ESP32 boards. I got it to the point where the code was doing all as expected on the breadboard, so I erased, flashed and loaded code on another ESP32 and it stopped working. I did the same on a 3rd and it worked fine. What might cause one board to not operate properly? Using v1.13 because at first I thought the problem might be related to v1.16 and wanted to stick with the original
Erase command:
esptool.py --chip esp32 --port COM3 erase_flash
Flash command:
esptool.py --chip esp32 --port COM3 write_flash -z 0x1000 esp32-idf4-20200902-v1.13.bin
Using powershell and ampy to load code (user path replaced with ... ):
Erase command:
esptool.py --chip esp32 --port COM3 erase_flash
Flash command:
esptool.py --chip esp32 --port COM3 write_flash -z 0x1000 esp32-idf4-20200902-v1.13.bin
Using powershell and ampy to load code (user path replaced with ... ):
Code: Select all
$defaultPort = 'COM3'
$port = $defaultPort
$folder = get-location
<#
$port = Read-Host "Port: [$($defaultPort)]"
if ([string]::IsNullOrWhiteSpace($port))
{
$port = $defaultPort
}
$folder = Read-Host -Prompt 'Folder to Upload'
if ([string]::IsNullOrWhiteSpace($folder))
{
$folder = get-location
Write-Host "Defaulting to current folder: "
Write-Host $folder
}
#>
$app = 'ampy.exe'
$arg1 = '-p'
$arg2 = $port
$arg3 = 'put'
<#
copy library files from the library folder
update this at one point to look to higher folder and libraries folder
this seems to fail the first time, so do it again after folder .py files
#>
$fileName = "...\OneDrive - mc2software, Inc\Development\Automation\Python Projects\libraries\mc2software.py"
$arg4 = $fileName
Write-Host "Uploading " $fileName
& $app $arg1 $arg2 $arg3 $arg4
$files = Get-ChildItem $folder -Filter *.py
foreach ($f in $files)
{
$file = $f.FullName
$fileName = $f.Name
Write-Host "Uploading " $fileName
$arg4 = $file
& $app $arg1 $arg2 $arg3 $arg4
}
<#
copy library files from the library folder
this seems to fail the first time, so do it again
#>
$fileName = "...\OneDrive - mc2software, Inc\Development\Automation\Python Projects\libraries\mc2software.py"
$arg4 = $fileName
Write-Host "Uploading " $fileName
& $app $arg1 $arg2 $arg3 $arg4