Returning Hobbyist - Finally Semi-Retirement :-)

Hi everyone, I hope I’m in the right place for my queries, please feel free to re-direct me if not!
I’m returning back to mbed after about a 4year abscence (day job always got in my way).
I originally had access to mbed through the online workspace management and used OS2 and OS3 to develop my programs and understanding of the code with previous fantastic help from the community when I got stuck (Many thanks to Wim Huiskamp!)
So, I installed the Windows Mbed Studio and began getting my head around the differences.
I have two LPC1768’s which I use to work with, so I dove right in and copied over a file I knew worked fine for example and went through the process of building…
First problem…wait() has been deprecated, so found that thread_sleep_for(1000) replaced it and no problems in building.
The program I have is a simple program using a 7 segment led to display units and tens as it counts every second. (I used this program incorporated into a temperature sensor later on).
What I’m struggling with is the following:-
The program writes to the LPC1768 but does not increment every second?
If I unplug the USB lead (LPC1768 powered externally) and press the rest button the file gets deleted or removed? It never did that before in OS2 or OS3 pressing reset just reset the board.
I’m not getting the expected outputs from the pins I’m using to power up the correct segments?
More than happy to share my code but I think you can find my old previous forum messages under Derek Calland.
Finally thank you for anyones response as I get to grips with OS6…great to have time on my hands now.
Regards,
Degs

Hello Darek,

and welcome back. Unfortunately Wim Huiskamp is not active member of community for last few years.

Before you continue Firmware LPC1768 LPC11U24 - Handbook | Mbed

If you are talking about binary file in your DAP-link memory, then it is normal I think. I have nop experience with that, but ST-link does that too. After Binary is flashed to the processor the binary disappear.

BR, Jan

Hi Jan,
Thanks for that information.
During the build I got this problem message:-
In included file: “Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)”
So I guess I’ll have to update the firmware for the LPC1678 as advised and see what happens with the OS6 version of my program.
Incidentally as a check I’m just running it perfectly from the OS3 version downloaded to the board abd the tens and units are being displayed as expected on the 7 segment displays.

Thanks for your advice.

Strange this…
I’ve just checked that when I build the file then run the file, there is no .bin file created to be downloaded to the device?
And no file is actually on the device?
Would this be a firmware issue or something I’m missing in Mbed Studio?

Thanks for any guidance.

So…I’ve gone to Firmware update site and coppied this file directly to the LPC1768
mbedmicrontroller_141212.if

When I investigate MBED.HTM or System Volume Information, I see no evidence of an upgrade or nothing that tells me what the current Firmware version is?

The Mbed Studio still doesn’t create a .bin file to be downloaded to the LPC1768?

Darek,

  • if your compilation is OK, the bin file is in BUILD folder of your project. The compilation report ends with Image: BUILD/LPC1768/ARMC6\mbed-os-empty.bin
  • if you use build button (hammer icon) for build, then then the binary will be only bilded
  • if you use run button (play icon) for for build, then it will build the binary and also upload the binary to your target

I am not sure about current state of LPc1768 with MbedStudio at this moment.

For standard drag & drop you have to open project folder via a File manager of your OS
For example - C:\Users\user name\Mbed Programs\mbed-os-empty\BUILD\LPC1768\ARMC6

Arm Mbed Studio - Arm Mbed Studio | Mbed Studio Documentation

BR, Jan

Marvellous Jan,

Thank you so much, I’m up and running again :slight_smile:
I’ll copy all my old programs over onto OS6 in the Mbed Studio and take it from there revising what I was trying to do.

Hi all what all will need to changed for OS 5 to the current OS 6 , I have went through the API’s , as I am looking for code to read values on , DHT-22 temp & humidity sensor, MQ-7 gas sensor and sparkfun weather meter kit , i checked for sample code but dont find much for the sparkfun weather meter kit .

Hello,

for DHT look to this topic
For the rest, please share links to libraries what you usually use, then we can look on that

most important changes for end user were around Serial APIs, delay functions (chrono time format was add)and so on.

BR, Jan

Here is some feedback from another ‘old’ program I had which uses a TMP_102 I2C temperature sensor.
Maybe this post needs to be a new thread?

I couldn’t get the program to compile as this error occurred:
./mbed-os/rtos/include\rtos/Kernel.h:27:10: fatal error: ‘chrono’ file not found

I found a thread on the forum and changed the associated files .c extension to .cpp and it compiled and built succesfully.
I built the circuit and the sensor and 7 segment displays are working fine.
However the compiler throws up the following warnings:

Compile [ 41.0%]: NanostackPPPInterface.cpp
[Warning] NanostackPPPInterface.cpp@20,10: non-portable path to file ‘“ppp.h”’; specified path differs in case from file name on disk [-Wnonportable-include-path]

Compile [ 41.9%]: WisunBorderRouter.cpp
[Warning] WisunBorderRouter.cpp@43,37: ‘reinterpret_cast’ to class ‘WisunInterface *’ from its virtual base ‘NetworkInterface *’ behaves differently from ‘static_cast’ [-Wreinterpret-base-class]
[Warning] WisunBorderRouter.cpp@90,37: ‘reinterpret_cast’ to class ‘WisunInterface *’ from its virtual base ‘NetworkInterface *’ behaves differently from ‘static_cast’ [-Wreinterpret-base-class]

Is this useful information for the developers and in terms of my program what does the warning imply?

Regards,
Degs

Dear All

I tried to use the below to read value’s from my MQ-7 sensor but it not reading any values , on my serial monitor I am using MBED OS6 ,

Hello Darek,

You do not use it in your project, so you don’t have to deal with it I think.

BR, Jan

Hello,

the library is very simple and it is not affected by any changes in MbedOS. So I do not see any potential problem here. The exmaple is also old, but when you replace wait(1); to thread_slepp_for(1000); it will be also OK.

But what did you expect from the library? The libary returns only 0 or 1.
Carbon Monoxide MQ-7 Gas Sensor | Mbed

BR, Jan

Dear Jan

I am looking for the MQ-7 to produce PPM values I am using the nucleo F446RE MCU ,

Regards

According to this exist two types of that sensors. One with Alarm only and second one where the ppm is possible to measure. Try to look here IoT Gas Sensing | Mbed

BR, Jan