Spark Logic

PJON

rajdarge Mon Apr 25, 2016 11:47 pm

Trying to modify the PJON library to suit a STM32F103RB (Blue pill).
In order for the Library to compile I need to know what the name of my board is to the compiler
like ESP8266 … etc.
I have already tried.
GENERIC_STM32F103R

Replies

WereCatf Mon Apr 25, 2016 11:59 pm

Use __STM32F1__

rajdarge Tue Apr 26, 2016 5:48 am

so I tried this and get the response:
WARNING: library PJON claims to run on [avr, esp8266, sam, samd] architecture(s) and may be incompatible with your current board which runs on [STM32F1] architecture(s).

and the same compilation errors.

WereCatf Tue Apr 26, 2016 6:03 am

rajdarge wrote:so I tried this and get the response:
WARNING: library PJON claims to run on [avr, esp8266, sam, samd] architecture(s) and may be incompatible with your current board which runs on [STM32F1] architecture(s).

and the same compilation errors.

zoomx Tue Apr 26, 2016 6:04 am

In the library.properties file there is a line which describes the architecture supported by the library.
architectures=avr,esp8266,sam,samd

RogerClark Tue Apr 26, 2016 10:00 am

Looking at the code, you’d also need to add special implementations in digitalWriteFast for STM32 (libmaple)

https://github.com/gioblu/PJON/blob/331 … riteFast.h

Good luck with doing that, as it looks like rather convoluted.
Goodness knows why they implemented it with using the preprocessor to the extreme.
There are other projects which use fast GPIO access e.g. the OneWire lib and the fast GPIO access code is not so complex.

I’d be tempted to fork the repo and just replace that file altogether

rajdarge Tue Apr 26, 2016 11:36 pm

zoomx wrote:In the library.properties file there is a line which describes the architecture supported by the library.
architectures=avr,esp8266,sam,samd

RogerClark Wed Apr 27, 2016 12:15 am

I just meant that the direct / fast access to the gpio in this was written in what appears to be a very complicated way.
I used OneWire as an example of a library that does direct hardware access in a simpler way.

I didn’t mean that you can use OneWire to communicate, rather than this library.

rajdarge Wed Apr 27, 2016 1:31 am

RogerClark wrote:I just meant that the direct / fast access to the gpio in this was written in what appears to be a very complicated way.
I used OneWire as an example of a library that does direct hardware access in a simpler way.

I didn’t mean that you can use OneWire to communicate, rather than this library.

RogerClark Wed Apr 27, 2016 1:37 am

There used to be a library called Virtual Wire, that did comms between Arduinos, but it looks like it got swallowed up by the RadioHead library and is now discontinued

http://www.airspayce.com/mikem/arduino/VirtualWire/

mrburnette Wed Apr 27, 2016 1:17 pm

RogerClark wrote:There used to be a library called Virtual Wire, that did comms between Arduinos, but it looks like it got swallowed up by the RadioHead library and is now discontinued

http://www.airspayce.com/mikem/arduino/VirtualWire/

mrburnette Wed Apr 27, 2016 1:30 pm

rajdarge wrote:
<…>Having the esp sitting there without utilizing its power seems such a waste.

rajdarge Wed Apr 27, 2016 10:33 pm

mrburnette wrote:IF you are not using the RF, you can disable it easily. Then just use the ESP8266 as an Arduino and forget about the WiFi part.

mrburnette Thu Apr 28, 2016 2:34 pm

rajdarge wrote:<…>
So the current configuration is this:
I2c devices: RTC, Fuel Guage
SPI devices: TOuch panel, TFT panel, SD card.
One wire devices: 5xDS18b20
PIR, BUZZER, WS2812b (as a status light).
<…>

rajdarge Thu Apr 28, 2016 7:28 pm

mrburnette wrote:My philosophy is to design smart… just because an STM32F103 is running at 72MHz and (neglecting optimizations) has 72MIPS and 20K of SRAM, a good design will not go over perhaps 70% of the bandwidth and memory capability. Sometimes, one may design a bit higher, say 80%, but only if the uC and peripherals are ‘well understood’ and critical timing is not mandatory.

mrburnette Thu Apr 28, 2016 8:57 pm

rajdarge wrote:<…>
It is meant to monitor a Vaccine fridge.
<…>
In my travels solving the time issue was the most difficult (and inter arduino comms). I get NTP time, and I use WUNDERGROUND to obtain the current TimeZone offset and Daylight savings offset, (as well as local weather conditions as a bonus) based on GPS coordinates For display on the device. I haven’t connected a GPS device as the vaccines are indoors, <…>
<…>
Most of the problems I have already solved and implemented.
No I am not planning to make this a commercial device. It really only for my use and the use of staff.
<…>
correct me if I am mistaken but isn’t that the way the easytransfer library works? I am reading up on struct memory management at the moment as EasyTransfer given examples of int’s and floats but I also use c_strings (char), but are Strings a bridge too far? I was already working on sending a struct or a class over the wires, but didn’t know enough about either data device to really implement it.

rajdarge Thu Apr 28, 2016 11:10 pm

mrburnette wrote:OK… great info and should have been in first post as it helps. With non-commercial stuff, it really helps to have the full picture.

rajdarge Thu Apr 28, 2016 11:32 pm

External Logical controller:
Isn’t that what I’m kinda doing with the esp?
The esp functioning as a black box and sending stuff to the internet and telling the STM that all that stuff is ok, so don’t you worry your pretty little head about it.
I wish I had the time to fiddle with the fridge compressor and make it controllable as well, but I don’t – so that’s probably a good thing :)

mrburnette Thu Apr 28, 2016 11:52 pm

rajdarge wrote:<…>
Thanks for he confidence boost. I have good problem solving skills, but my programming skills are poor with C++, the syntax still throws me. As far as experience goes: I taught myself machine code, and then MacroAssembly on 6502 when I was 13, I learn a little bit of electronics (transistors, opamps, diodes, etc as a 13 year old).

rajdarge Fri Apr 29, 2016 12:03 am

Ok well I can afford to put my project on hold and learn C++ the easier way. Sorry about the old man status – wear it as a badge of honour :)

ahull Fri Apr 29, 2016 12:20 am

rajdarge wrote:Ok well I can afford to put my project on hold and learn C++ the easier way. Sorry about the old man status – wear it as a badge of honour :)

Sign in to reply