I recently I bought a Webduino-Smart. It’s an easily available ESP-12/ESP8266 chip in my country and it can be powered through a micro USB power supply. However, I’m not fond of the javascript based development methodology. Hence I wanted to move to a different firmware.

For me the ESP8266 Arduino Core was exactly what I was looking for. Especially, because I was already familiar with Arduino development.

Unfortunately, the Webduino-Smart does not feature a USB-TTL adapter. As a consequence, the Webduino Smart cannot be programmed/flashed as easily as I was used to from the Arduino UNO. After doing some research I was able to misuse the Arduino UNO board as an USB-TTL adapter.

So here is how I could upload my sketch from the Arduino IDE through the Arduino UNO to my Webduino-Smart.

Remove the ATMEGA microcontroller from the Arduino UNO. The Arduino is still accessible through the device /dev/ttyACM0.

Then connect the communication channels tx and rx from the Arduino to the Webduino. (TX <-> TX, RX <-> RX)

Connect the grounds of the two boards (GND <-> GND).

Pull the GPIO0 of the Webduino to 0 by connecting it to the ground of the Arduino (GND <-> 00). This puts the ESP-12/ESP8266 into flash mode and lets you flash a new firmware to the device.

Power the Webduino with 3.3V by connecting the 3.3V ouput from the Arduino to the power input VCC of the Webduino (3.3V <-> VCC).

Upload the sketch by pressing the upload button in the Arduino IDE.Note: I had to disconnect and reconnect the power of the Webduino before uploading a sketch.

In order to run the sketch I simply removed the (GND <-> 00) connection so that the Webduino boots no longer into flash mode. Then reboot the Webduino by disconnecting and reconnecting the power supply.

I read somewhere that it is not necessary to remove the ATMEGA microcontroller. The entire process should also work with the controller in place. I never tried this since I was fine flashing to Webduino without the controller.

Disclaimer: I know that the Webduino runs on 3.3V but the TX/RX pin of the Arduino are 5V. So, there is a risk of frying the Webduino. It worked for me without problems though. So, just for the record, use this procedure at your own risk!

I had multiple chart in one Excel Worksheet and wanted to change the scale of the x-axis and y-axis to the logarithmic scale. The following macro toggles between the linear and logarithmic scale for all charts:

Sub ChartsToggle()
For i =1 To ActiveSheet.ChartObjects.Count
Application.DisplayAlerts= False
If ActiveSheet.ChartObjects(i).Chart.Axes(xlCategory).ScaleType= xlLinear Then
ActiveSheet.ChartObjects(i).Chart.Axes(xlCategory).ScaleType= xlLogarithmic
ActiveSheet.ChartObjects(i).Chart.Axes(xlValue).ScaleType= xlLogarithmic
Else
ActiveSheet.ChartObjects(i).Chart.Axes(xlCategory).ScaleType= xlLinear
ActiveSheet.ChartObjects(i).Chart.Axes(xlValue).ScaleType= xlLinear
End If
Next i
Application.DisplayAlerts= True
End Sub

. This prevents Excel from opening a dialog box, for every chart, informing you that negative values cannot be displayed. The dialog is just shown once at the end. I had to put this line inside the for-loop because it got changed back to true after the chart modification.

A commonly used risk measure is the Expected Shortfall. Unfortunately, this function to calculate the sample expected shortfall is rarely implemented. As there is much data stored in databases accessible through SQL, I tried to calculate this value directly in SQL. It turns out this is a one-liner. Let’s assume we have a table called “LossSimulation” and a column/field named “LossValue” then the sample expected shortfall at level 95% is