5.0

5.0 | 4 ratings Rate this file 46 Downloads (last 30 days) File Size: 17.8 KB File ID: #41491
image thumbnail

Raspberry Pi Driver Block SFunction

by

 

25 Apr 2013 (Updated )

Simple Digital Out SFunction example block showing how to use the WiringPi library

| Watch this File

File Information
Description

An example SFunction block for Raspberry Pi showing basic usage of the WiringPi library
The latest version of this file and others can be found at our Raspberry Pi downloads page:

http://minseg.webs.com/downloads

A complete Arduino library and curriculum is available here:
http://minseg.com/pages/downloads

coming soon:
- PWM
- Quadrature Encoder
- MPU6050

and others!

Acknowledgements

Device Drivers inspired this file.

Required Products Simulink
MATLAB
MATLAB release MATLAB 8.1 (R2013a)
Other requirements Raspberry Pi targetinstaller package
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
22 Feb 2014 Miguel

Hi I have the following problem.
All to Tools -> Run on Target Hardware -> RUN
I get:
Error in S-function 'Digital_Out_SFunction_Example / Toggle Pin Digital Output With SFunction': S-Function 'sfcn_Digital_Out' does not exist

They know how to fix it, possess the xls file and I can not install it on my Raspberry Pi. Thank you.

06 Dec 2013 Liang Xuan

Hi Daniel, the problem solved when you replace the original wiringPi library in the raspberry with the latest version.

06 Dec 2013 Liang Xuan  
14 Nov 2013 Daniel

Alexander, I keep getting a similar error. What did you do to get yours working?

Thank you,
Daniel

22 May 2013 Alexander

Ive got it, ty.

22 May 2013 Alexander

hey, ive took this one by one and:

The call to realtime_make_rtw_hook, during the after_make hook generated the following error:
Error executing SSH command: make: Entering directory `/home/pi/Digital_Out_SFunction_Example_rtt'
"gcc" -I"./" -O3 -D"MODEL=Digital_Out_SFunction_Example" -D"NUMST=1" -D"NCSTATES=0" -D"HAVESTDIO=" -D"ONESTEPFCN=0" -D"TERMFCN=1" -D"MAT_FILE=0" -D"MULTI_INSTANCE_CODE=0" -D"INTEGER_CODE=0" -D"MT=0" -D"CLASSIC_INTERFACE=0" -D"TID01EQ=0" -D"_USE_TARGET_UDP_=" -D"_RUNONTARGETHARDWARE_BUILD_=" -c ./MW_gpio.c ./MW_pinMux.c ./linuxUDP.c ./Digital_Out_SFunction_Example.c ./Digital_Out_SFunction_Example_data.c ./ert_main.c ./sfcn_Digital_Out_wrapper.c
./sfcn_Digital_Out_wrapper.c:38:50: fatal error: /home/pi/wiringPi/wiringPi/gertboard.h: No such file or directory
compilation terminated.
make: *** [MW_gpio.o] Error 1
make: Leaving directory `/home/pi/Digital_Out_SFunction_Example_rtt'

The build process will terminate as a result.

Caused by:
Error executing SSH command: make: Entering directory `/home/pi/Digital_Out_SFunction_Example_rtt'
"gcc" -I"./" -O3 -D"MODEL=Digital_Out_SFunction_Example" -D"NUMST=1" -D"NCSTATES=0" -D"HAVESTDIO=" -D"ONESTEPFCN=0" -D"TERMFCN=1" -D"MAT_FILE=0" -D"MULTI_INSTANCE_CODE=0" -D"INTEGER_CODE=0" -D"MT=0" -D"CLASSIC_INTERFACE=0" -D"TID01EQ=0" -D"_USE_TARGET_UDP_=" -D"_RUNONTARGETHARDWARE_BUILD_=" -c ./MW_gpio.c ./MW_pinMux.c ./linuxUDP.c ./Digital_Out_SFunction_Example.c ./Digital_Out_SFunction_Example_data.c ./ert_main.c ./sfcn_Digital_Out_wrapper.c
./sfcn_Digital_Out_wrapper.c:38:50: fatal error: /home/pi/wiringPi/wiringPi/gertboard.h: No such file or directory
compilation terminated.
make: *** [MW_gpio.o] Error 1
make: Leaving directory `/home/pi/Digital_Out_SFunction_Example_rtt'

Some hints?

Regards,
Alex

29 Apr 2013 Murat Belge  
Updates
22 Aug 2014

updated links

Contact us