Flyby of Van Wyck Junior High School. DJI Phantom 3

Posted in Uncategorized | Leave a comment

Panorama of Dutchess Stadium, DJI Phantom 3, Fishkill, NY

DJI_0001-2-HDR-Pano-3

Hey everybody!  Here’s a shot from last night taken with my DJI Phantom 3 over at Dutchess Stadium in Fishkill, NY.  I was taking some sunset photos over at the Hudson River and on the way home saw there was a game going on, so I parked my car and and proceeded to take the photos to create this shot.

This panorama consists of a grid of 3 rows and 4 columns of HDR photos and I’m doing the HDR merge in Lightroom and then the panorama merge in Adobe Lightroom.  Here’s how it looks all merged together in Lightroom:

Screen Shot 2017-06-23 at 1.01.50 PM

As you can see I went a bit wider than I needed to.  I also spent some time deepening the sky to get the really dramatic color.

This is tons of fun and I can’t wait to make an enlargement from this!

Please comment below and let me know what you think.

Thanks!

Steve

Posted in FPV, Photography | Leave a comment

Time lapse of sky after a thunderstorm – Millbrook, NY (Canon 70D)

This is a little different for me, but while I was driving home last night I set up this time lapse using my new Canon 70D.  The footage lasts close to 1/2 an hour.

Even though this isn’t my normal stuff, I thought I would share anyways.  Check it out:

This is up in Millbrook, NY overlooking a farm.

For this particular shot I just recorded video and then when editing in Apple iMove was able to accelerate to 2000%.  This works quite well and I can upload directly to YouTube from there.

Please let me know you comments.

Posted in Photography | Leave a comment

Stonykill Farm, High Dynamic Range, Panorama

Here’s a photograph I made using the HDR Panorama technique over at Stonykill Farm over in Wappingers Falls, NY.  It is comprised of about 15 images stitched together.  Zoom in to see the extreme detail in the image.

Prints are available (comment below and I will send details).

Click on the image to zoom in and see the extreme detail.

DJI_0383-HDR-Pano-2

Posted in Uncategorized | Leave a comment

Obtaining my Remote Pilots Certification FAA Part 107

Recently, I obtained my Remote Pilots Certification and have been getting a lot of questions from people in the FPV and general aviation community about this.  As such I thought I would write a question and answer post about my experience with this.  Most importantly I tell you how I prepared for the exam and how I recommend to prepare for others.

Why do you need to get your Remote Pilots Certification?

As a pure hobbyist you do not need to get a Remote Pilots Certificate.  You can operate your RC aircraft and drones within the guidelines of the FAA.  You you want to operate a drone for some kind of commercial activity (aerial photography, surveying, mapping, etc) you DO require the remote pilots certification.

I recently purchased a Phantom 3 Standard and have ambitions of using this commercially in 2017 for photography and videography.

How do you obtain the Remote Pilots Certification?

Check out this link on the FAA website which list all of the requirements for the certification.  There you will find out about the basic age requirements you will also find out how to register for the aeronautical knowledge test.  This test covers the following topics from the FAA website:

  1. Applicable regulations relating to small unmanned aircraft system rating privileges, limitations, and flight operation
  2. Airspace classification and operating requirements, and flight restrictions affecting small unmanned aircraft operation
  3. Aviation weather sources and effects of weather on small unmanned aircraft performance
  4. Small unmanned aircraft loading and performance
  5. Emergency procedures
  6. Crew resource management
  7. Radio communication procedures
  8. Determining the performance of small unmanned aircraft
  9. Physiological effects of drugs and alcohol
  10. Aeronautical decision-making and judgment
  11. Airport operations
  12. Maintenance and preflight inspection procedures

How did I prepare for the exam?

There are a number of options out there for preparing for the exams including in person courses and paid for online video courses.  I choose not to take either of these are prepare on my own.  I spent about 5 hours studying for the exam focusing on the following materials:

  • The online FAA course.  This gives you a good overview of the regulations specific to drone operation like how and when you can fly, requirements of the drone, airspace classes.  Check it out here.
  • The pilots handbook of aeronautical knowledge.  This is a great resource not just for the test, but also as a general guide on aviation.  Read it over as you have time.
  • My main focus for preparing for the exam was taking the practice exam and really understanding the answers.  The exam can be found here.  Take the exam and REALLY understand the answer and the theory behind the answers.  There arent really any surprises on the exam if you know this question set.

Test taking tips

You are given 2 hours to take the test and it is 61 questions.  There are a lot of questions about charts.  This is the one topic which unless you come from an aviation background you really have to study for.  One tip I have for you is to know ahead of time you will be given a book of charts to take the test with and in that book is a very detailed legend of the charts.  I found a few answers to questions in that book as I was taking it.  Beyond that take your time going through the questions.  You have the ability to mark a question so that you can return to it later.  Run through the questions initially answering the obvious one and then come back to the others later.

Ok, thats it for now.  Please post any comments and questions you have about the test here on the blog.

Good luck!

Posted in Uncategorized | 3 Comments

Bread Boarding the LPC1114 DIP28

I’ve been getting some questions about how I work with the LPC1114 DIP28 chip which will be used in the RC controller.  My approach is a little different (and might even constitute a hack) and thought I would take the time to share the setup.  First of all I’ll mention I’ve decided to focus on using the LPC1114 over something more mainstream (such at the 8bit Atmega chips used by the Arduino family) for the raw performance of a 32 bit processor and ease of migrating to even more powerful processors in the future.

The LPC1114 DIP28 serves as a great hacker/maker chip for electronic projects.  It’s cheap and easy to work with on the breadboard.  What’s even better are the development boards which are available from Embedded Artists which include an SWD (JTAG-like with reduced pin count) debugger.  This debugger allows you to flash the part, single step through your code, and examine memory.  These boards start as low as $20.  I know they now offer a stand alone debugger (called something like LPCLINK2) – however if you buy one of the standard boards you get the debugger plus a target board for the same price.

Hardware

In this tutorial we’ll run the PLL off the internal oscillator at 48Mhz.  It’s not as accurate as with the optional crystal, but for many applications this is good enough and save the crystal plus two additional caps.

In my case I’m starting with the LPC1769 board:

IMG_0648

Figure 1 – LPCLINK and LPC1769 Target Card

The first thing to do is separate the LPC-LINK from the target card (saving the target card for a future project).  It is a little tricky to cut them as there is no scoring on the PCB between the two.  To cut them I used my Dremel tool with my favorite cut-off disk:

IMG_1702

Figure 2 – Separating the LPCLINK from the target card

The actual cut preserves all of the holes on the LPCLINK side and cuts into the holds on the LPC1769 – it’s a sacrifice you have to make, but keeps the LPC1769 useable.  Save it for a later project.

For a cable to connect from the LPCLINK to a pin header which can be plugged into a breadboard I used a piece of leftover Ethernet cable.  The wiring of this goes as follows:

    • White/Green – 3.3V
    • Blue – SWDDATA
    • Green – SWDCLK
    • N/C
    • N/C
    • N/C
    • Black – GND
IMG_1703

Figure 3 – Wiring up the LPCLINK

I found that it was easier to wire the the cable to the backside of the LPCLINK:

IMG_1705

Figure 4 – Connecting the wires to the LPC-LINK

For the pin header connections are as follow:

    • Green – SWDCLK
    • N/C
    • N/C
    • N/C
    • Black – GND
    • White/Green – 3.3V
    • N/C
    • N/C
    • N/C
    • Blue – SWDDATA
IMG_1707

Figure 5 – Connecting the wires to the pin header

Before you put the DIP into the breadboard it is good to press the rows of pins inwards just a little bit – as you’ll need to save one of the rows of pins to fit the breadboard:

IMG_1710

Figure 6 – Close up of the DIP28

I got tired of constantly checking with the databook to see what the pin assignments were – so I made up these stickers to make it easier to remember:

IMG_1714

Figure 7 – With the sticker I made up to easily identify the pins

Seat the chip so that you have three rows of pin above and below the chip:

IMG_1713

Figure 8 – Mounting it on the breadboard

Here it is with the sticker attached:

IMG_1717

Figure 9 – Mounted on the breadboard

The wiring begins with connecting VDD with the AREF and the analog and digital ground supplies:

IMG_1719

Figure 10 – Connecting Power and Ground

Next add a decoupling cap and LED to pin 8:

IMG_1731

Figure 11 – Adding a decoupling cap and LED

Finally seat the pin header and you’re ready to start programming.

IMG_1732

Figure 12 – Connecting the SWD pin header – DONE!

Software

I’ve spent quite a bit of time evaluating Code Red LPCExpresso IDE as well as the other toolchains for programming the LPC1114.  Regarding LPCExpresso – while it does offer an Eclipse based IDE with embedded debugger for programming with a debugging with the LPCLINK there were a few of reasons that it wasn’t my first choice.

  1. It doesn’t support C++ with the free version
  2. To used the optimized library you need to link in the closed source REDLIB (in place of newLib)
  3. I never really liked the overall Eclispse GUI – it was too complicated with too many features

Instead my toolchain / setup consists of  the gcc toolkit which is officially supported by ARM by Joey Ye and his team.  This can be downloaded here:

https://launchpad.net/gcc-arm-embedded

This toolchain contains “newlib-nano” which is nicely code optimized as we’ll see with our upcoming code example.  They also offer ticket based support and are quite responsive when if you run into trouble.

In addition there are some drivers withing  LPCEXPRESSO which are needed to supporting flashing the LPC1114 as well as the gdb debugger.  This can be downloaded here:

http://lpcware.com/lpcxpresso/download

Install these two packages, but remember where you install the the two package as they will be referenced by the setup script:

#  Step 1:  Set path to GCC toolkit
TOOLKIT=~stevenparker/toolchains/gcc-arm-none-eabi-4_7-2013q2/bin 

#  Step 2:  Set path to Code Red Tools
CRT=/Applications/lpcxpresso_5.1.0_2048/lpcxpresso/bin

#  Add path to GCC
PATH=$TOOLKIT:$CRT:$PATH

#  Boot LPCLINK (Mac/Linux)
dfu-util -d 0x471:0xdf55 -c 0 -t 2048 -R -D $CRT/LPCXpressoWIN.enc

I got the file lpc1114.c from Wouter van Ooijen (www.voti.nl).  He has an excellent tutorial of what this is doing in terms of initializing local memory which can be found here http://www.embeddedrelated.com/showarticle/104.php.  My blinky example is quite a bit different that his, but this initialization code (and explanation) in this tutorial is really excellent..

//===========================================================================
// LPC1114 startup
// Wouter van Ooijen - wouter@voti.nl
// license: zlib
//===========================================================================

int main( void );
extern "C" { void __startup( void ); }
extern int __stack_end;    		

// nr 7 (offset 0x1C) is the vectors checksum
extern void (* const __vectors[ 40 ])(void) 
   __attribute__ ((section(".vectors"))) = {
      (void (*)(void)) & __stack_end,	
      __startup,
      0,          /* NMI Handler */
      0,          /* Hard Fault Handler */
      0,          /* Reserved */
      0,          /* Reserved */
      0,          /* Reserved */
      0,          /* Reserved */
      0,          /* Reserved */
      0,          /* Reserved */
      0,          /* Reserved */
      0,          /* SVCall Handler */
      0,          /* Reserved */
      0,          /* Reserved */
      0,          /* PendSV Handler */
      0,          /* SysTick Handler */
      0,          /* IRQ0 */
      0,          /* IRQ1 */
      0,          /* IRQ2 */
      0,          /* IRQ3 */
      0,          /* IRQ4 */
      0,          /* IRQ5 */
      0,          /* IRQ6 */
      0,          /* IRQ7 */
      0,          /* IRQ8 */
      0,          /* IRQ9 */
      0,          /* IRQ10 */
      0,          /* IRQ11 */
      0,          /* IRQ12 */
      0,          /* IRQ13 */
      0,          /* IRQ14 - SPI1    */
      0,          /* IRQ15 - I2C     */
      0,          /* IRQ16 - CT16B0  */
      0,          /* IRQ17 - CT16B1  */
      0,          /* IRQ18 - CT32B0  */
      0,          /* IRQ19 - CT32B1  */
      0,          /* IRQ20 - SPI0    */
      0           /* IRQ21 - UART    */

};

void __startup(void){
   extern int __data_init_start;
   extern int __data_start;
   extern int __data_end;
   extern int __bss_start;
   extern int __bss_end;
   extern int __init_array_start;
   extern int __init_array_end;
   
	 int *s, *d, *e;

	 // clear .bss section 
	 d = & __bss_start;
	 e = & __bss_end;
	 while( d != e ){
	    *d++ = 0;
	 }
	 
	 // copy .data section from flash to ram
	 s = & __data_init_start;
	 d = & __data_start;
	 e = & __data_end;
	 while( d != e ){ 
	    *d++ = *s++;
	 } 
	 
	 // call the constructorts of global objects
	 s = & __init_array_start;
	 e = & __init_array_end;
	 while( s != e ){
	    (*((void(**)())s++))();
	 }
  
   // call main   
   (void) main(); 
   
   // when main returns: loop till hell freezes down
   while(1){}	
   
}

// called when a pure virtual method is called
extern "C" void __cxa_pure_virtual( void ){
   while(1){}	
}

The actual C code which is written to blink the LED is simplified in a way which doesn’t use any of the CORETEX libraries.  In this can you can take the value from the data book and simply plug it into the code:

#define  MMIO(addr) (*(volatile int*)addr)

//  SYSCON Registers
#define SYSAHBCLKCTRL  MMIO(0x40048080)

//  GPIO Registers
#define GPIO0DIR       MMIO(0x50008000)
#define GPIO0DATA      MMIO(0x50003FFC)

//  IOCON
#define IOCON_PIO0_8   MMIO(0x40044060)

int main()
{
  int i;

  //  Enable clocks on advanced high-performance bus
  //  SYSCLK on IRC - for simplicity
  SYSAHBCLKCTRL = 0x3FFFF;

  //  Configure PIO0_8 as General Purpose IO
  IOCON_PIO0_8 = 0x00;

  //  Configure PIO0_8 as output
  GPIO0DIR= 0x100;

  while(1) {
    GPIO0DATA = GPIO0DATA | 0x100;      // Turn on
    for(i=0;i<1000000;i++) asm("NOP");  // Pause
    GPIO0DATA = GPIO0DATA & ~(0x100);   // Turn on
    for(i=0;i<1000000;i++) asm("NOP");  // Pause
  }  
}

Finally to pull this all together in a way that really made sense to me I needed to get Freddie Chopin’s Makefile (although I added the debug and debugtui steps to interface with the LPCLINK):

#=============================================================================#
# ARM makefile
#
# author: Freddie Chopin, http://www.freddiechopin.info/
# last change: 2010-10-13
#
# this makefile is based strongly on many examples found in the network
#=============================================================================#

#=============================================================================#
# toolchain configuration
#=============================================================================#

TOOLCHAIN = arm-none-eabi-
CRTEMU =  crt_emu_lpc11_13_nxp

CXX = $(TOOLCHAIN)g++
CC = $(TOOLCHAIN)gcc
AS = $(TOOLCHAIN)gcc -x assembler-with-cpp
OBJCOPY = $(TOOLCHAIN)objcopy
OBJDUMP = $(TOOLCHAIN)objdump
SIZE = $(TOOLCHAIN)size
RM = rm -f

#=============================================================================#
# project configuration
#=============================================================================#

# project name
PROJECT = project

# core type
CORE = cortex-m0

# linker script
LD_SCRIPT = lpc1114.ld

# output folder (absolute or relative path, leave empty for in-tree compilation)
OUT_DIR = out

# C++ definitions (e.g. "-Dsymbol_with_value=0xDEAD -Dsymbol_without_value")
CXX_DEFS =

# C definitions
C_DEFS =

# ASM definitions
AS_DEFS =

# include directories (absolute or relative paths to additional folders with
# headers, current folder is always included)
INC_DIRS = 

# library directories (absolute or relative paths to additional folders with
# libraries)
LIB_DIRS =

# libraries (additional libraries for linking, e.g. "-lm -lsome_name" to link
# math library libm.a and libsome_name.a)
LIBS = -lc -lc -lnosys

# additional directories with source files (absolute or relative paths to
# folders with source files, current folder is always included)
SRCS_DIRS = 

# extension of C++ files
CXX_EXT = cpp

# wildcard for C++ source files (all files with CXX_EXT extension found in
# current folder and SRCS_DIRS folders will be compiled and linked)
CXX_SRCS = $(wildcard $(patsubst %, %/*.$(CXX_EXT), . $(SRCS_DIRS)))

# extension of C files
C_EXT = c

# wildcard for C source files (all files with C_EXT extension found in current
# folder and SRCS_DIRS folders will be compiled and linked)
C_SRCS = $(wildcard $(patsubst %, %/*.$(C_EXT), . $(SRCS_DIRS)))

# extension of ASM files
AS_EXT = S

# wildcard for ASM source files (all files with AS_EXT extension found in
# current folder and SRCS_DIRS folders will be compiled and linked)
AS_SRCS = $(wildcard $(patsubst %, %/*.$(AS_EXT), . $(SRCS_DIRS)))

# optimization flags ("-O0" - no optimization, "-O1" - optimize, "-O2" -
# optimize even more, "-Os" - optimize for size or "-O3" - optimize yet more) 
OPTIMIZATION = -Os

# warning options 
CXX_WARNINGS = # -Wall -Wextra
C_WARNINGS = # -Wall -Wstrict-prototypes -Wextra

# C++ language standard ("c++98", "gnu++98" - default, "c++0x", "gnu++0x")
CXX_STD = gnu++98

# C language standard ("c89" / "iso9899:1990", "iso9899:199409",
# "c99" / "iso9899:1999", "gnu89" - default, "gnu99")
C_STD = gnu89

#=============================================================================#
# set the VPATH according to SRCS_DIRS
#=============================================================================#

VPATH = $(SRCS_DIRS)

#=============================================================================#
# when using output folder, append trailing slash to its name
#=============================================================================#

ifeq ($(strip $(OUT_DIR)), )
    OUT_DIR_F =
else
	OUT_DIR_F = $(strip $(OUT_DIR))/
endif

#=============================================================================#
# various compilation flags
#=============================================================================#

# core flags
CORE_FLAGS = -mcpu=$(CORE) -mthumb

# listing flags
LISTING_FLAGS = -Wa,-ahlms=$(OUT_DIR_F)$(notdir $(<:.c=.lst))

# flags for C++ compiler
CXX_FLAGS = --specs=nano.specs -std=$(CXX_STD) -g -ggdb3 -fno-rtti -fno-exceptions -fverbose-asm $(LISTING_FLAGS)

# flags for C compiler
C_FLAGS = --specs=nano.specs -std=$(C_STD) -g -ggdb3 -fverbose-asm -Wa,-ahlms=$(OUT_DIR_F)$(notdir $(<:.$(C_EXT)=.lst))

# flags for assembler
AS_FLAGS = -g -ggdb3 -Wa,-amhls=$(OUT_DIR_F)$(notdir $(<:.$(AS_EXT)=.lst))

# flags for linker
LD_FLAGS = -T$(LD_SCRIPT) -O -g -Wl,-Map=$(OUT_DIR_F)$(PROJECT).map,--cref,--no-warn-mismatch

# remove unused code and data
LD_FLAGS += -Wl,--gc-sections
OPTIMIZATION += -ffunction-sections -fdata-sections

# do not use the standard startup
LD_FLAGS += 


#=============================================================================#
# do some formatting
#=============================================================================#

CXX_OBJS = $(addprefix $(OUT_DIR_F), $(notdir $(CXX_SRCS:.$(CXX_EXT)=.o)))
C_OBJS = $(addprefix $(OUT_DIR_F), $(notdir $(C_SRCS:.$(C_EXT)=.o)))
AS_OBJS = $(addprefix $(OUT_DIR_F), $(notdir $(AS_SRCS:.$(AS_EXT)=.o)))
OBJS = $(AS_OBJS) $(C_OBJS) $(CXX_OBJS) $(USER_OBJS)
DEPS = $(OBJS:.o=.d)
INC_DIRS_F = -I. $(patsubst %, -I%, $(INC_DIRS))
LIB_DIRS_F = $(patsubst %, -L%, $(LIB_DIRS))

ELF = $(OUT_DIR_F)$(PROJECT).elf
HEX = $(OUT_DIR_F)$(PROJECT).hex
BIN = $(OUT_DIR_F)$(PROJECT).bin
LSS = $(OUT_DIR_F)$(PROJECT).lss
DMP = $(OUT_DIR_F)$(PROJECT).dmp

# format final flags for tools, request dependancies for C++, C and asm
CXX_FLAGS_F = $(CORE_FLAGS) $(OPTIMIZATION) $(CXX_WARNINGS) $(CXX_FLAGS)  $(CXX_DEFS) -MD -MP -MF $(OUT_DIR_F)$(@F:.o=.d) $(INC_DIRS_F)
C_FLAGS_F = $(CORE_FLAGS) $(OPTIMIZATION) $(C_WARNINGS) $(C_FLAGS) $(C_DEFS) -MD -MP -MF $(OUT_DIR_F)$(@F:.o=.d) $(INC_DIRS_F)
AS_FLAGS_F = $(CORE_FLAGS) $(AS_FLAGS) $(AS_DEFS) -MD -MP -MF $(OUT_DIR_F)$(@F:.o=.d) $(INC_DIRS_F)
LD_FLAGS_F = $(CORE_FLAGS) $(LD_FLAGS) $(LIB_DIRS_F)

#contents of output directory
GENERATED = $(wildcard $(patsubst %, $(OUT_DIR_F)*.%, bin d dmp elf hex lss lst map o))

#=============================================================================#
# make all
#=============================================================================#

all : make_output_dir $(ELF) $(LSS) $(DMP) $(HEX) $(BIN) print_size 

# make object files dependent on Makefile
$(OBJS) : Makefile
# make .elf file dependent on linker script
$(ELF) : $(LD_SCRIPT)


#-----------------------------------------------------------------------------#
# linking - objects -> elf
#-----------------------------------------------------------------------------#

$(ELF) : $(OBJS)
	@echo 'Linking target: $(ELF)'
	$(CXX) $(LD_FLAGS_F) $(OBJS) $(LIBS) -o $@
	@echo ' '

#-----------------------------------------------------------------------------#
# compiling - C++ source -> objects
#-----------------------------------------------------------------------------#

$(OUT_DIR_F)%.o : %.$(CXX_EXT)
	@echo 'Compiling file: $<'
	$(CXX) -c $(CXX_FLAGS_F) $< -o $@
	@echo ' '

#-----------------------------------------------------------------------------#
# compiling - C source -> objects
#-----------------------------------------------------------------------------#

$(OUT_DIR_F)%.o : %.$(C_EXT)
	@echo 'Compiling file: $<'
	$(CXX) -c $(CXX_FLAGS_F) $< -o $@
	@echo ' '

#-----------------------------------------------------------------------------#
# assembling - ASM source -> objects
#-----------------------------------------------------------------------------#

$(OUT_DIR_F)%.o : %.$(AS_EXT)
	@echo 'Assembling file: $<'
	$(AS) -c $(AS_FLAGS_F) $< -o $@
	@echo ' '

#-----------------------------------------------------------------------------#
# memory images - elf -> hex, elf -> bin
#-----------------------------------------------------------------------------#

$(HEX) : $(ELF)
	@echo 'Creating IHEX image: $(HEX)'
	$(OBJCOPY) -O ihex $< $@
	@echo ' '

$(BIN) : $(ELF)
	@echo 'Creating binary image: $(BIN)'
	$(OBJCOPY) -O binary $< $@
	@echo ' '

#-----------------------------------------------------------------------------#
# memory dump - elf -> dmp
#-----------------------------------------------------------------------------#

$(DMP) : $(ELF)
	@echo 'Creating memory dump: $(DMP)'
	$(OBJDUMP) -x --syms $< > $@
	@echo ' '

#-----------------------------------------------------------------------------#
# extended listing - elf -> lss
#-----------------------------------------------------------------------------#

$(LSS) : $(ELF)
	@echo 'Creating extended listing: $(LSS)'
	$(OBJDUMP) -S $< > $@
	@echo ' '

#-----------------------------------------------------------------------------#
# print the size of the objects 
#-----------------------------------------------------------------------------#

print_size :
	@echo 'Size of modules:'
	$(SIZE) -B -t --common $(OBJS) $(USER_OBJS)
	@echo ' '

#-----------------------------------------------------------------------------#
# run
#-----------------------------------------------------------------------------#

run : all 
	$(CRTEMU) -2 -pLPC1114FN/102 -wire=winusb -flash-load-exec=$(ELF) -load-base=0x0000

debug: $(ELF)
	arm-none-eabi-gdb -x gdb_commands $(ELF)

debugtui: $(ELF)
	arm-none-eabi-gdbtui -x gdb_commands $(ELF)

#-----------------------------------------------------------------------------#
# create the desired output directory
#-----------------------------------------------------------------------------#

make_output_dir :
	$(shell mkdir $(OUT_DIR_F) 2>/dev/null)

#=============================================================================#
# make clean
#=============================================================================#

clean:
ifeq ($(strip $(OUT_DIR_F)), )
	@echo 'Removing all generated output files'
else
	@echo 'Removing all generated output files from output directory: $(OUT_DIR_F)'
endif
ifneq ($(strip $(GENERATED)), )
	$(RM) $(GENERATED)
else
	@echo 'Nothing to remove...'
endif

#=============================================================================#
# global exports
#=============================================================================#

.PHONY: all clean dependents

.SECONDARY:

# include dependancy files
-include $(DEPS)

Compiling and Running

Compiling the code is a breeze under Mac OSX, Linux, or mingw:

TerminalScreenSnapz002

 The code compiles to just 346 bytes!

Debugging

Running “make debug”

TerminalScreenSnapz003

This gets you into an interactive gdb session with the code we just wrote.  I’m not going to go into the details of gdb here, but it is a powerful command line debugger.

Well there you have it 32bit ARM development with a SWD debugger for about $25..  I hope this tutorial helped.  You can find all the source code at (check the newstyle branch):

https://github.com/scparker/minimum

Comments please.

 

Posted in Uncategorized | 8 Comments

Radio Controlled Microcontroller System

With fall rapidly approaching it’s time to starting thinking about winter projects.  Over the past year I have been working offline with an ARM microcontroller with the intention that it would be used for my RC/FPV ambitions when I was ready.  There was a lot of learning to be done with this before I could share/teach was I was learning, but now I think I’m ready.

I’ve been hesitant to share this with my readers as previous posts which were overly technical didn’t seem to resonate with my audience as the more general posts on RC planes and FPV.  It worried me that if I simply shift gears too suddenly it might be the same as staring a new blog from scratch.

The reality here is I’m not flying as much as I was and am not creating the content as I did when I started.  There are a lot more RC websites out there now – covering many of the same topics.  I also don’t want this to be a site which is covering the same topics as many other RC websites – it needs to be a source of content which is interesting an unique.

At this point I’ve decided to go full force in this direction and while we may lose some readers I believe we’ll more than make up for this with a new audience.  So strap in and enjoy the ride.  ;-)

The first project I’ll be exploring is a Radio Controlled Microcontroller System.  This isn’t intended to be a clone of any of the very good controllers out there now – but a starting point for new projects and experiments.  It is also a way to explore modern hobby electronics in a way that might motivate people to try one of these experiments themselves.

 

There are many potential uses for this system as I will be exploring with my RC cars and RC/FPV planes (and will be interested in hearing about other ideas from my readers).

I’ve sent my first design out for PCB manufacturing:

Google ChromeScreenSnapz002

It includes:

  • NXP’s LPC1114 DIP28
  • A bluetooth interface to a PC or mobile device
  • An MPU6050 gyro/accelerometer
  • 4x Servo inputs from a RC receiver
  • 4x Servo outputs to ESCs or servos
  • A SWD in-circuit system programming interface for flashing and controlling the chip
  • An LED to monitor operation

With this setup I’m initially looking to:

  • Port my tricopter Arduino code over to the more powerful ARM processor
  • Monitor my RC car’s performance for weekly racing
  • Stabilize the Bixler’s flight

There is a lot to cover here and I’m excited to start this new thread.  Looking forward to your comments!

-Steve

 

Posted in Microcontrollers | 4 Comments

Are you kidding me????

Obviously not my video  – what an idiot!

Posted in Uncategorized | Leave a comment