Successful Test

Side Project:

I got the parts to build the OLED breakout PCB this week. I got them assembled and connected to my test STM32 Arduino device. Unfortunately, I didn’t get anything to show up on the display.  I did measure the 13.8 volts on the high voltage part of the circuit. (I wasn’t sure if the inductor I chose for this voltage could handle the current. I am still not sure)

The STM board got hot quickly when trying to drive the OLED. This leads me to believe that the OLED is drawing too much current.  I expect this display to work as well as the test display I have been using. It should draw about the same amount of current. My first guess is I have a solder bridge somewhere on the PCB.

Research:

I created a C project with multiple files and it worked without any problems. So I did a little  research and found that when I add C into a C++ project I need to tell the compiler which functions are written in C.  I found that I can wrap the #include in an extern “C”{} declaration.

Still Looking for a Fail:

Continue reading

Multi File Failure

Side Project:

I received the OLED breakout PCBs from OHSpark this week #SSD1332Breakout. I also received some of the parts to build it with.  I am hoping to have a working OLED by the end of this next week.  I will start with it in SPI mode to use existing code that I know works.  Then I will have to migrate the library to use 8 bit parallel interface mode.

I have decided to move forward with the STM32F103 as the microcontroller for the Arduino Compass Toy.  The microchip part is still a possibility if the STM32 chip doesn’t work out.

The Challenge:

I posted an Arduino programming challenge to the Arduino.cc community on Google+ and to twitter this week.

The challenge is to make a blink sketch that has nothing in it’s loop().

This is a just for fun challenge. The only requirements are that the LED blinks and loop() is empty.

I ask that submissions are made on February 22nd 2017 tagged with #ArduinoEmptyLoopChallenge

Click here to see the Google+ post.

Adventures in TDD:

Continue reading

Unit Testing

TDD/Unit Testing:

I searched some for TDD tutorials this week. and found a few. Unfortunately, I found tutorials with no or very little “hands on” practice.  So I am still looking for good tutorials.  When I find some, I will post links on this blog.

What I have gleaned from the tutorials so far is that when building your code, you replace your main file with your testing file(s) so that the tests can call each of the functions/methods individually with known values and should get back predictable results.

Embedded Units Testing:

For embedded systems unit testing, my code will be compiled to run natively on the development machine rather than being compiled for the target processor.  This means a different tool chain for test build than for production or debug builds.

Note: Tool Chain is the set of tools that are used to create machine runnable code from your source files.

Any API call or peripheral device needs to have mock code that can be run as part of the tests.

Note: Mock Code is software that represents things that are not on your testing machine, or would hinder testing.

“Hello World”:

Continue reading

Refactoring

Update:

No new information on the ADC feature request on Espressif”s forums.

Side Project:

I have started layout of the SSD1332 Breakout PCB.  I finished the layout and ordered PCBs from OSHPark.  Based on the datasheet for the SSD1332, I can get significantly better performance by using it in one of the 8 bit bus modes.  Someone suggested that I look at STM32 processors to drive the display with.  I will be considering that option this week.

Better Firmware:

Continue reading